![]() |
![]() |
![]() |
GIMP Library Reference Manual | ![]() |
---|---|---|---|---|
gint32 gimp_vectors_get_image (gint32 vectors_ID); gboolean gimp_vectors_get_linked (gint32 vectors_ID); gchar* gimp_vectors_get_name (gint32 vectors_ID); gint gimp_vectors_get_tattoo (gint32 vectors_ID); gboolean gimp_vectors_get_visible (gint32 vectors_ID); gint32 gimp_vectors_new (gint32 image_ID, const gchar *name); gboolean gimp_vectors_set_linked (gint32 vectors_ID, gboolean linked); gboolean gimp_vectors_set_name (gint32 vectors_ID, const gchar *name); gboolean gimp_vectors_set_tattoo (gint32 vectors_ID, gint tattoo); gboolean gimp_vectors_set_visible (gint32 vectors_ID, gboolean visible); gint* gimp_vectors_get_strokes (gint32 vectors_ID, gint *num_strokes); gboolean gimp_vectors_parasite_attach (gint32 vectors_ID, const GimpParasite *parasite); gboolean gimp_vectors_parasite_detach (gint32 vectors_ID, const gchar *name); GimpParasite* gimp_vectors_parasite_find (gint32 vectors_ID, const gchar *name); gboolean gimp_vectors_parasite_list (gint32 vectors_ID, gint *num_parasites, gchar ***parasites); gboolean gimp_vectors_stroke_close (gint32 vectors_ID, gint stroke_id); gboolean gimp_vectors_stroke_remove (gint32 vectors_ID, gint stroke_id); gdouble gimp_vectors_stroke_get_length (gint32 vectors_ID, gint stroke_id, gdouble prescision); gdouble gimp_vectors_stroke_get_point_at_dist (gint32 vectors_ID, gint stroke_id, gdouble dist, gdouble prescision, gdouble *y_point, gdouble *slope, gboolean *valid); gboolean gimp_vectors_stroke_interpolate (gint32 vectors_ID, gint stroke_id, gdouble prescision, gint *num_coords, gdouble **coords); gboolean gimp_vectors_stroke_scale (gint32 vectors_ID, gint stroke_id, gdouble scale_x, gdouble scale_y); gboolean gimp_vectors_stroke_translate (gint32 vectors_ID, gint stroke_id, gint off_x, gint off_y); gboolean gimp_vectors_bezier_stroke_conicto (gint32 vectors_ID, gint stroke_id, gdouble x0, gdouble y0, gdouble x1, gdouble y1); gboolean gimp_vectors_bezier_stroke_cubicto (gint32 vectors_ID, gint stroke_id, gdouble x0, gdouble y0, gdouble x1, gdouble y1, gdouble x2, gdouble y2); gboolean gimp_vectors_bezier_stroke_lineto (gint32 vectors_ID, gint stroke_id, gdouble x0, gdouble y0); gint gimp_vectors_bezier_stroke_new_ellipse (gint32 vectors_ID, gdouble x0, gdouble y0, gdouble radius_x, gdouble radius_y, gdouble angle); gint gimp_vectors_bezier_stroke_new_moveto (gint32 vectors_ID, gdouble x0, gdouble y0);
gint32 gimp_vectors_get_image (gint32 vectors_ID);
Returns the vectors objects image.
Returns the vectors objects image.
vectors_ID : |
The vectors object. |
Returns : | The vectors image. |
Since GIMP 2.4
gboolean gimp_vectors_get_linked (gint32 vectors_ID);
Gets the linked state of the vectors object.
Gets the linked state of the vectors object.
vectors_ID : |
The vectors object. |
Returns : | TRUE if the path is linked, FALSE otherwise. |
Since GIMP 2.4
gchar* gimp_vectors_get_name (gint32 vectors_ID);
Gets the name of the vectors object.
Gets the name of the vectors object.
vectors_ID : |
The vectors object. |
Returns : | The name of the vectors object. |
Since GIMP 2.4
gint gimp_vectors_get_tattoo (gint32 vectors_ID);
Get the tattoo of the vectors object.
Get the tattoo state of the vectors object.
vectors_ID : |
The vectors object. |
Returns : | The vectors tattoo. |
Since GIMP 2.4
gboolean gimp_vectors_get_visible (gint32 vectors_ID);
Gets the visibility of the vectors object.
Gets the visibility of the vectors object.
vectors_ID : |
The vectors object. |
Returns : | TRUE if the path is visible, FALSE otherwise. |
Since GIMP 2.4
gint32 gimp_vectors_new (gint32 image_ID, const gchar *name);
Creates a new empty vectors object.
Creates a new empty vectors object. Needs to be added to an image using gimp_image_add_vectors.
image_ID : |
The image. |
name : |
the name of the new vector object. |
Returns : | the current vector object, 0 if no vector exists in the image. |
Since GIMP 2.4
gboolean gimp_vectors_set_linked (gint32 vectors_ID, gboolean linked);
Sets the linked state of the vectors object.
Sets the linked state of the vectors object.
vectors_ID : |
The vectors object. |
linked : |
Whether the path is linked. |
Returns : | TRUE on success. |
Since GIMP 2.4
gboolean gimp_vectors_set_name (gint32 vectors_ID, const gchar *name);
Sets the name of the vectors object.
Sets the name of the vectors object.
vectors_ID : |
The vectors object. |
name : |
the new name of the path. |
Returns : | TRUE on success. |
Since GIMP 2.4
gboolean gimp_vectors_set_tattoo (gint32 vectors_ID, gint tattoo);
Set the tattoo of the vectors object.
Set the tattoo of the vectors object.
vectors_ID : |
The vectors object. |
tattoo : |
the new tattoo. |
Returns : | TRUE on success. |
Since GIMP 2.4
gboolean gimp_vectors_set_visible (gint32 vectors_ID, gboolean visible);
Sets the visibility of the vectors object.
Sets the visibility of the vectors object.
vectors_ID : |
The vectors object. |
visible : |
Whether the path is visible. |
Returns : | TRUE on success. |
Since GIMP 2.4
gint* gimp_vectors_get_strokes (gint32 vectors_ID, gint *num_strokes);
List the strokes associated with the passed path.
Returns an Array with the stroke-IDs associated with the passed path.
vectors_ID : |
The vectors object. |
num_strokes : |
The number of strokes returned. |
Returns : | List of the strokes belonging to the path. |
Since GIMP 2.4
gboolean gimp_vectors_parasite_attach (gint32 vectors_ID, const GimpParasite *parasite);
Add a parasite to a vectors object
This procedure attaches a parasite to a vectors object. It has no return values.
vectors_ID : |
The vectors object. |
parasite : |
The parasite to attach to a vectors object. |
Returns : | TRUE on success. |
Since GIMP 2.4
gboolean gimp_vectors_parasite_detach (gint32 vectors_ID, const gchar *name);
Removes a parasite from a vectors object
This procedure detaches a parasite from a vectors object. It has no return values.
vectors_ID : |
The vectors object. |
name : |
The name of the parasite to detach from a vectors object. |
Returns : | TRUE on success. |
Since GIMP 2.4
GimpParasite* gimp_vectors_parasite_find (gint32 vectors_ID, const gchar *name);
Finds the named parasite in a vectors object
Finds and returns the named parasite that was previously attached to a vectors object.
vectors_ID : |
The vectors object. |
name : |
The name of the parasite to find. |
Returns : | The found parasite. |
Since GIMP 2.4
gboolean gimp_vectors_parasite_list (gint32 vectors_ID, gint *num_parasites, gchar ***parasites);
List all parasites.
Returns a list of all currently attached parasites.
vectors_ID : |
The vectors object. |
num_parasites : |
The number of attached parasites. |
parasites : |
The names of currently attached parasites. |
Returns : | TRUE on success. |
Since GIMP 2.4
gboolean gimp_vectors_stroke_close (gint32 vectors_ID, gint stroke_id);
closes the specified stroke.
Closes the specified stroke.
vectors_ID : |
The vectors object. |
stroke_id : |
The stroke ID. |
Returns : | TRUE on success. |
Since GIMP 2.4
gboolean gimp_vectors_stroke_remove (gint32 vectors_ID, gint stroke_id);
remove the stroke from a vectors object.
Remove the stroke from a vectors object.
vectors_ID : |
The vectors object. |
stroke_id : |
The stroke ID. |
Returns : | TRUE on success. |
Since GIMP 2.4
gdouble gimp_vectors_stroke_get_length (gint32 vectors_ID, gint stroke_id, gdouble prescision);
Measure the length of the given stroke.
Measure the length of the given stroke.
vectors_ID : |
The vectors object. |
stroke_id : |
The stroke ID. |
prescision : |
The prescision used for the approximation. |
Returns : | The length (in pixels) of the given stroke. |
Since GIMP 2.4
gdouble gimp_vectors_stroke_get_point_at_dist (gint32 vectors_ID, gint stroke_id, gdouble dist, gdouble prescision, gdouble *y_point, gdouble *slope, gboolean *valid);
Get point at a specified distance along the stroke.
This will return the x,y position of a point at a given distance along the stroke. The distance will be obtained by first digitizing the curve internally and then walking along the curve. For a closed stroke the start of the path is the first point on the path that was created. This might not be obvious. If the stroke is not long enough, a \"valid\" flag will be FALSE.
vectors_ID : |
The vectors object. |
stroke_id : |
The stroke ID. |
dist : |
The given distance. |
prescision : |
The prescision used for the approximation. |
y_point : |
The y position of the point. |
slope : |
The slope (dy / dx) at the specified point. |
valid : |
Indicator for the validity of the returned data. |
Returns : | The x position of the point. |
Since GIMP 2.4
gboolean gimp_vectors_stroke_interpolate (gint32 vectors_ID, gint stroke_id, gdouble prescision, gint *num_coords, gdouble **coords);
returns polygonal approximation of the stroke.
returns polygonal approximation of the stroke.
vectors_ID : |
The vectors object. |
stroke_id : |
The stroke ID. |
prescision : |
The prescision used for the approximation. |
num_coords : |
The number of floats returned. |
coords : |
List of the coords along the path (x0, y0, x1, y1, ...). |
Returns : | List of the strokes belonging to the path. |
Since GIMP 2.4
gboolean gimp_vectors_stroke_scale (gint32 vectors_ID, gint stroke_id, gdouble scale_x, gdouble scale_y);
scales the given stroke.
Scale the given stroke.
vectors_ID : |
The vectors object. |
stroke_id : |
The stroke ID. |
scale_x : |
Scale factor in x direction. |
scale_y : |
Scale factor in y direction. |
Returns : | TRUE on success. |
Since GIMP 2.4
gboolean gimp_vectors_stroke_translate (gint32 vectors_ID, gint stroke_id, gint off_x, gint off_y);
translate the given stroke.
Translate the given stroke.
vectors_ID : |
The vectors object. |
stroke_id : |
The stroke ID. |
off_x : |
Offset in x direction. |
off_y : |
Offset in y direction. |
Returns : | TRUE on success. |
Since GIMP 2.4
gboolean gimp_vectors_bezier_stroke_conicto (gint32 vectors_ID, gint stroke_id, gdouble x0, gdouble y0, gdouble x1, gdouble y1);
Extends a bezier stroke with a conic bezier spline.
Extends a bezier stroke with a conic bezier spline. Actually a cubic bezier spline gets added that realizes the shape of a conic bezier spline.
vectors_ID : |
The vectors object. |
stroke_id : |
The stroke ID. |
x0 : |
The x-coordinate of the control point. |
y0 : |
The y-coordinate of the control point. |
x1 : |
The x-coordinate of the end point. |
y1 : |
The y-coordinate of the end point. |
Returns : | TRUE on success. |
Since GIMP 2.4
gboolean gimp_vectors_bezier_stroke_cubicto (gint32 vectors_ID, gint stroke_id, gdouble x0, gdouble y0, gdouble x1, gdouble y1, gdouble x2, gdouble y2);
Extends a bezier stroke with a cubic bezier spline.
Extends a bezier stroke with a cubic bezier spline.
vectors_ID : |
The vectors object. |
stroke_id : |
The stroke ID. |
x0 : |
The x-coordinate of the first control point. |
y0 : |
The y-coordinate of the first control point. |
x1 : |
The x-coordinate of the second control point. |
y1 : |
The y-coordinate of the second control point. |
x2 : |
The x-coordinate of the end point. |
y2 : |
The y-coordinate of the end point. |
Returns : | TRUE on success. |
Since GIMP 2.4
gboolean gimp_vectors_bezier_stroke_lineto (gint32 vectors_ID, gint stroke_id, gdouble x0, gdouble y0);
Extends a bezier stroke with a lineto.
Extends a bezier stroke with a lineto.
vectors_ID : |
The vectors object. |
stroke_id : |
The stroke ID. |
x0 : |
The x-coordinate of the lineto. |
y0 : |
The y-coordinate of the lineto. |
Returns : | TRUE on success. |
Since GIMP 2.4
gint gimp_vectors_bezier_stroke_new_ellipse (gint32 vectors_ID, gdouble x0, gdouble y0, gdouble radius_x, gdouble radius_y, gdouble angle);
Adds a bezier stroke describing an ellipse the vectors object.
Adds a bezier stroke describing an ellipse the vectors object.
vectors_ID : |
The vectors object. |
x0 : |
The x-coordinate of the center. |
y0 : |
The y-coordinate of the center. |
radius_x : |
The radius in x direction. |
radius_y : |
The radius in y direction. |
angle : |
The angle the x-axis of the ellipse (radians, counterclockwise). |
Returns : | The resulting stroke. |
Since GIMP 2.4
gint gimp_vectors_bezier_stroke_new_moveto (gint32 vectors_ID, gdouble x0, gdouble y0);
Adds a bezier stroke with a single moveto to the vectors object.
Adds a bezier stroke with a single moveto to the vectors object.
vectors_ID : |
The vectors object. |
x0 : |
The x-coordinate of the moveto. |
y0 : |
The y-coordinate of the moveto. |
Returns : | The resulting stroke. |
Since GIMP 2.4