GimpStroke

GimpStroke

Synopsis

                    GimpStroke;
void                gimp_stroke_set_ID                  (GimpStroke *stroke,
                                                         gint id);
gint                gimp_stroke_get_ID                  (const GimpStroke *stroke);
GimpAnchor *        gimp_stroke_anchor_get              (const GimpStroke *stroke,
                                                         const GimpCoords *coord);
gdouble             gimp_stroke_nearest_point_get       (const GimpStroke *stroke,
                                                         const GimpCoords *coord,
                                                         const gdouble precision,
                                                         GimpCoords *ret_point,
                                                         GimpAnchor **ret_segment_start,
                                                         GimpAnchor **ret_segment_end,
                                                         gdouble *ret_pos);
gdouble             gimp_stroke_nearest_tangent_get     (const GimpStroke *stroke,
                                                         const GimpCoords *coords1,
                                                         const GimpCoords *coords2,
                                                         gdouble precision,
                                                         GimpCoords *nearest,
                                                         GimpAnchor **ret_segment_start,
                                                         GimpAnchor **ret_segment_end,
                                                         gdouble *ret_pos);
gdouble             gimp_stroke_nearest_intersection_get
                                                        (const GimpStroke *stroke,
                                                         const GimpCoords *coords1,
                                                         const GimpCoords *direction,
                                                         gdouble precision,
                                                         GimpCoords *nearest,
                                                         GimpAnchor **ret_segment_start,
                                                         GimpAnchor **ret_segment_end,
                                                         gdouble *ret_pos);
GimpAnchor *        gimp_stroke_anchor_get_next         (const GimpStroke *stroke,
                                                         const GimpAnchor *prev);
void                gimp_stroke_anchor_select           (GimpStroke *stroke,
                                                         GimpAnchor *anchor,
                                                         gboolean selected,
                                                         gboolean exclusive);
void                gimp_stroke_anchor_move_relative    (GimpStroke *stroke,
                                                         GimpAnchor *anchor,
                                                         const GimpCoords *delta,
                                                         GimpAnchorFeatureType feature);
void                gimp_stroke_anchor_move_absolute    (GimpStroke *stroke,
                                                         GimpAnchor *anchor,
                                                         const GimpCoords *coord,
                                                         GimpAnchorFeatureType feature);
GArray *            gimp_stroke_control_points_get      (const GimpStroke *stroke,
                                                         gboolean *closed);
gboolean            gimp_stroke_point_is_movable        (GimpStroke *stroke,
                                                         GimpAnchor *predec,
                                                         gdouble position);
void                gimp_stroke_point_move_relative     (GimpStroke *stroke,
                                                         GimpAnchor *predec,
                                                         gdouble position,
                                                         const GimpCoords *deltacoord,
                                                         GimpAnchorFeatureType feature);
void                gimp_stroke_point_move_absolute     (GimpStroke *stroke,
                                                         GimpAnchor *predec,
                                                         gdouble position,
                                                         const GimpCoords *coord,
                                                         GimpAnchorFeatureType feature);
void                gimp_stroke_close                   (GimpStroke *stroke);
void                gimp_stroke_anchor_convert          (GimpStroke *stroke,
                                                         GimpAnchor *anchor,
                                                         GimpAnchorFeatureType feature);
void                gimp_stroke_anchor_delete           (GimpStroke *stroke,
                                                         GimpAnchor *anchor);
GimpStroke *        gimp_stroke_open                    (GimpStroke *stroke,
                                                         GimpAnchor *end_anchor);
gboolean            gimp_stroke_anchor_is_insertable    (GimpStroke *stroke,
                                                         GimpAnchor *predec,
                                                         gdouble position);
GimpAnchor *        gimp_stroke_anchor_insert           (GimpStroke *stroke,
                                                         GimpAnchor *predec,
                                                         gdouble position);
gboolean            gimp_stroke_is_extendable           (GimpStroke *stroke,
                                                         GimpAnchor *neighbor);
GimpAnchor *        gimp_stroke_extend                  (GimpStroke *stroke,
                                                         const GimpCoords *coords,
                                                         GimpAnchor *neighbor,
                                                         GimpVectorExtendMode extend_mode);
gboolean            gimp_stroke_connect_stroke          (GimpStroke *stroke,
                                                         GimpAnchor *anchor,
                                                         GimpStroke *extension,
                                                         GimpAnchor *neighbor);
gboolean            gimp_stroke_is_empty                (const GimpStroke *stroke);
gdouble             gimp_stroke_get_length              (const GimpStroke *stroke,
                                                         const gdouble precision);
gdouble             gimp_stroke_get_distance            (const GimpStroke *stroke,
                                                         const GimpCoords *coord);
gboolean            gimp_stroke_get_point_at_dist       (const GimpStroke *stroke,
                                                         const gdouble dist,
                                                         const gdouble precision,
                                                         GimpCoords *position,
                                                         gdouble *slope);
GArray *            gimp_stroke_interpolate             (const GimpStroke *stroke,
                                                         const gdouble precision,
                                                         gboolean *closed);
GimpBezierDesc *    gimp_stroke_make_bezier             (const GimpStroke *stroke);
GimpStroke *        gimp_stroke_duplicate               (const GimpStroke *stroke);
void                gimp_stroke_translate               (GimpStroke *stroke,
                                                         gdouble offset_x,
                                                         gdouble offset_y);
void                gimp_stroke_scale                   (GimpStroke *stroke,
                                                         gdouble scale_x,
                                                         gdouble scale_y);
void                gimp_stroke_rotate                  (GimpStroke *stroke,
                                                         gdouble center_x,
                                                         gdouble center_y,
                                                         gdouble angle);
void                gimp_stroke_flip                    (GimpStroke *stroke,
                                                         GimpOrientationType flip_type,
                                                         gdouble axis);
void                gimp_stroke_flip_free               (GimpStroke *stroke,
                                                         gdouble x1,
                                                         gdouble y1,
                                                         gdouble x2,
                                                         gdouble y2);
void                gimp_stroke_transform               (GimpStroke *stroke,
                                                         const GimpMatrix3 *matrix);
GList *             gimp_stroke_get_draw_anchors        (const GimpStroke *stroke);
GList *             gimp_stroke_get_draw_controls       (const GimpStroke *stroke);
GArray *            gimp_stroke_get_draw_lines          (const GimpStroke *stroke);

Object Hierarchy

  GObject
   +----GimpObject
         +----GimpStroke
               +----GimpBezierStroke

Properties

  "closed"                   gboolean              : Read / Write / Construct Only
  "control-points"           GValueArray*          : Write / Construct Only

Description

Details

GimpStroke

typedef struct _GimpStroke GimpStroke;


gimp_stroke_set_ID ()

void                gimp_stroke_set_ID                  (GimpStroke *stroke,
                                                         gint id);


gimp_stroke_get_ID ()

gint                gimp_stroke_get_ID                  (const GimpStroke *stroke);


gimp_stroke_anchor_get ()

GimpAnchor *        gimp_stroke_anchor_get              (const GimpStroke *stroke,
                                                         const GimpCoords *coord);


gimp_stroke_nearest_point_get ()

gdouble             gimp_stroke_nearest_point_get       (const GimpStroke *stroke,
                                                         const GimpCoords *coord,
                                                         const gdouble precision,
                                                         GimpCoords *ret_point,
                                                         GimpAnchor **ret_segment_start,
                                                         GimpAnchor **ret_segment_end,
                                                         gdouble *ret_pos);


gimp_stroke_nearest_tangent_get ()

gdouble             gimp_stroke_nearest_tangent_get     (const GimpStroke *stroke,
                                                         const GimpCoords *coords1,
                                                         const GimpCoords *coords2,
                                                         gdouble precision,
                                                         GimpCoords *nearest,
                                                         GimpAnchor **ret_segment_start,
                                                         GimpAnchor **ret_segment_end,
                                                         gdouble *ret_pos);


gimp_stroke_nearest_intersection_get ()

gdouble             gimp_stroke_nearest_intersection_get
                                                        (const GimpStroke *stroke,
                                                         const GimpCoords *coords1,
                                                         const GimpCoords *direction,
                                                         gdouble precision,
                                                         GimpCoords *nearest,
                                                         GimpAnchor **ret_segment_start,
                                                         GimpAnchor **ret_segment_end,
                                                         gdouble *ret_pos);


gimp_stroke_anchor_get_next ()

GimpAnchor *        gimp_stroke_anchor_get_next         (const GimpStroke *stroke,
                                                         const GimpAnchor *prev);


gimp_stroke_anchor_select ()

void                gimp_stroke_anchor_select           (GimpStroke *stroke,
                                                         GimpAnchor *anchor,
                                                         gboolean selected,
                                                         gboolean exclusive);


gimp_stroke_anchor_move_relative ()

void                gimp_stroke_anchor_move_relative    (GimpStroke *stroke,
                                                         GimpAnchor *anchor,
                                                         const GimpCoords *delta,
                                                         GimpAnchorFeatureType feature);


gimp_stroke_anchor_move_absolute ()

void                gimp_stroke_anchor_move_absolute    (GimpStroke *stroke,
                                                         GimpAnchor *anchor,
                                                         const GimpCoords *coord,
                                                         GimpAnchorFeatureType feature);


gimp_stroke_control_points_get ()

GArray *            gimp_stroke_control_points_get      (const GimpStroke *stroke,
                                                         gboolean *closed);


gimp_stroke_point_is_movable ()

gboolean            gimp_stroke_point_is_movable        (GimpStroke *stroke,
                                                         GimpAnchor *predec,
                                                         gdouble position);


gimp_stroke_point_move_relative ()

void                gimp_stroke_point_move_relative     (GimpStroke *stroke,
                                                         GimpAnchor *predec,
                                                         gdouble position,
                                                         const GimpCoords *deltacoord,
                                                         GimpAnchorFeatureType feature);


gimp_stroke_point_move_absolute ()

void                gimp_stroke_point_move_absolute     (GimpStroke *stroke,
                                                         GimpAnchor *predec,
                                                         gdouble position,
                                                         const GimpCoords *coord,
                                                         GimpAnchorFeatureType feature);


gimp_stroke_close ()

void                gimp_stroke_close                   (GimpStroke *stroke);


gimp_stroke_anchor_convert ()

void                gimp_stroke_anchor_convert          (GimpStroke *stroke,
                                                         GimpAnchor *anchor,
                                                         GimpAnchorFeatureType feature);


gimp_stroke_anchor_delete ()

void                gimp_stroke_anchor_delete           (GimpStroke *stroke,
                                                         GimpAnchor *anchor);


gimp_stroke_open ()

GimpStroke *        gimp_stroke_open                    (GimpStroke *stroke,
                                                         GimpAnchor *end_anchor);


gimp_stroke_anchor_is_insertable ()

gboolean            gimp_stroke_anchor_is_insertable    (GimpStroke *stroke,
                                                         GimpAnchor *predec,
                                                         gdouble position);


gimp_stroke_anchor_insert ()

GimpAnchor *        gimp_stroke_anchor_insert           (GimpStroke *stroke,
                                                         GimpAnchor *predec,
                                                         gdouble position);


gimp_stroke_is_extendable ()

gboolean            gimp_stroke_is_extendable           (GimpStroke *stroke,
                                                         GimpAnchor *neighbor);


gimp_stroke_extend ()

GimpAnchor *        gimp_stroke_extend                  (GimpStroke *stroke,
                                                         const GimpCoords *coords,
                                                         GimpAnchor *neighbor,
                                                         GimpVectorExtendMode extend_mode);


gimp_stroke_connect_stroke ()

gboolean            gimp_stroke_connect_stroke          (GimpStroke *stroke,
                                                         GimpAnchor *anchor,
                                                         GimpStroke *extension,
                                                         GimpAnchor *neighbor);


gimp_stroke_is_empty ()

gboolean            gimp_stroke_is_empty                (const GimpStroke *stroke);


gimp_stroke_get_length ()

gdouble             gimp_stroke_get_length              (const GimpStroke *stroke,
                                                         const gdouble precision);


gimp_stroke_get_distance ()

gdouble             gimp_stroke_get_distance            (const GimpStroke *stroke,
                                                         const GimpCoords *coord);


gimp_stroke_get_point_at_dist ()

gboolean            gimp_stroke_get_point_at_dist       (const GimpStroke *stroke,
                                                         const gdouble dist,
                                                         const gdouble precision,
                                                         GimpCoords *position,
                                                         gdouble *slope);


gimp_stroke_interpolate ()

GArray *            gimp_stroke_interpolate             (const GimpStroke *stroke,
                                                         const gdouble precision,
                                                         gboolean *closed);


gimp_stroke_make_bezier ()

GimpBezierDesc *    gimp_stroke_make_bezier             (const GimpStroke *stroke);


gimp_stroke_duplicate ()

GimpStroke *        gimp_stroke_duplicate               (const GimpStroke *stroke);


gimp_stroke_translate ()

void                gimp_stroke_translate               (GimpStroke *stroke,
                                                         gdouble offset_x,
                                                         gdouble offset_y);


gimp_stroke_scale ()

void                gimp_stroke_scale                   (GimpStroke *stroke,
                                                         gdouble scale_x,
                                                         gdouble scale_y);


gimp_stroke_rotate ()

void                gimp_stroke_rotate                  (GimpStroke *stroke,
                                                         gdouble center_x,
                                                         gdouble center_y,
                                                         gdouble angle);


gimp_stroke_flip ()

void                gimp_stroke_flip                    (GimpStroke *stroke,
                                                         GimpOrientationType flip_type,
                                                         gdouble axis);


gimp_stroke_flip_free ()

void                gimp_stroke_flip_free               (GimpStroke *stroke,
                                                         gdouble x1,
                                                         gdouble y1,
                                                         gdouble x2,
                                                         gdouble y2);


gimp_stroke_transform ()

void                gimp_stroke_transform               (GimpStroke *stroke,
                                                         const GimpMatrix3 *matrix);


gimp_stroke_get_draw_anchors ()

GList *             gimp_stroke_get_draw_anchors        (const GimpStroke *stroke);


gimp_stroke_get_draw_controls ()

GList *             gimp_stroke_get_draw_controls       (const GimpStroke *stroke);


gimp_stroke_get_draw_lines ()

GArray *            gimp_stroke_get_draw_lines          (const GimpStroke *stroke);

Property Details

The "closed" property

  "closed"                   gboolean              : Read / Write / Construct Only

this flag indicates whether the stroke is closed or not.

Default value: FALSE


The "control-points" property

  "control-points"           GValueArray*          : Write / Construct Only

This is an ValueArray with the initial control points of the new Stroke.