See also: Main Index; Alphabetic; Misc; By Author; By Module; By Menu    External Links: The Gimp; Gimp User Manual

The Gimp path functions

gimp_get_path_by_tattoo Return the name of the path with the given tattoo.
gimp_path_delete Delete the named path associated with the passed image.
gimp_path_get_current The name of the current path. Error if no paths.
gimp_path_get_locked Returns the locked status associated with the named path.
gimp_path_get_point_at_dist Get point on a path at a specified distance along the path.
gimp_path_get_points List the points associated with the named path.
gimp_path_get_tattoo Returns the tattoo associated with the name path.
gimp_path_import Import paths from an SVG file.
gimp_path_import_string Import paths from an SVG string.
gimp_path_list List the paths associated with the passed image.
gimp_path_set_current Sets the current path associated with the passed image.
gimp_path_set_locked Set the locked status associated with the named path.
gimp_path_set_points Set the points associated with the named path.
gimp_path_set_tattoo Sets the tattoo associated with the named path.
gimp_path_stroke_current Stroke the current path in the passed image.
gimp_path_to_selection Transforms the active path into a selection
plug_in_sel2path Converts a selection to a path
plug_in_sel2path_advanced Converts a selection to a path (with advanced user menu)

gimp_get_path_by_tattoo

Input:
IMAGEimageThe image
INT32tattooThe tattoo of the required path.
Returns:
STRINGnameThe name of the path with the specified tattoo.
The procedure returns the name of the path in the specified image which has the passed tattoo. The tattoos are unique within the image and will be preserved across sessions and through renaming of the path. An error is returned if no path with the specified tattoo can be found.
Andy Thomas; 1999

gimp_path_delete

Input:
IMAGEimageThe ID of the image to delete the path from.
STRINGnameThe name of the path to delete.
Returns: nothing
Delete the named path.
Andy Thomas; 1999

gimp_path_get_current

Input:
IMAGEimageThe ID of the image to get the current path from.
Returns:
STRINGnameThe name of the current path.
The name of the current path. Error if no paths.
Andy Thomas; 1999

gimp_path_get_locked

Input:
IMAGEimageThe image
STRINGnameThe name of the path whose locked status should be obtained.
Returns:
INT32lockedTRUE if the path is locked, FALSE otherwise
This procedure returns the lock status associated with the specified path. A path can be "locked" which means that the transformation tool operations will also apply to the path.
Andy Thomas; 1999

gimp_path_get_point_at_dist

Input:
IMAGEimageThe ID of the image the paths belongs to
SUCCESSdistanceThe distance along the path.
Returns:
INT32x_pointThe x position of the point.
INT32y_pointThe y position of the point.
SUCCESSslopeThe slope (dy / dx) at the specified point.
This will return the x,y position of a point at a given distance along the bezier curve. The distance will be obtained by first digitizing the curve internally and then walking along the curve. For a closed curve the start of the path is the first point on the path that was created. This might not be obvious. Note the current path is used.
Andy Thomas; 1999

gimp_path_get_points

Input:
IMAGEimageThe ID of the image to list the paths from.
STRINGnameThe name of the path whose points should be listed.
Returns:
INT32path_typeThe type of the path. Currently only one type (1 = Bezier) is supported
INT32path_closedReturn if the path is closed. (0 = path open, 1 = path closed)
INT32num_path_point_detailsThe number of points returned. Each point is made up of (x, y, pnt_type) of floats.
FLOATARRAYpoints_pairsThe points in the path represented as 3 floats. The first is the x pos, next is the y pos, last is the type of the pnt. The type field is dependant on the path type. For beziers (type 1 paths) the type can either be (1.0 = BEZIER_ANCHOR, 2.0 = BEZIER_CONTROL, 3.0 = BEZIER_MOVE). Note all points are returned in pixel resolution.
List the points associated with the named path.
Andy Thomas; 1999

gimp_path_get_tattoo

Input:
IMAGEimageThe image
STRINGnameThe name of the path whose tattoo should be obtained.
Returns:
INT32tattooThe tattoo associated with the named path.
This procedure returns the tattoo associated with the specified path. A tattoo is a unique and permanent identifier attached to a path that can be used to uniquely identify a path within an image even between sessions.
Andy Thomas; 1999

gimp_path_import

Input:
IMAGEimageThe image
STRINGfilenameThe name of the SVG file to import.
INT32mergeMerge paths into a single vectors object.
INT32scaleScale the SVG to image dimensions.
Returns: nothing
This procedure imports paths from an SVG file. SVG elements other than paths and basic shapes are ignored.
Sven Neumann; 2003

gimp_path_import_string

Input:
IMAGEimageThe image
STRINGstringA string that must be a complete and valid SVG document.
INT32lengthNumber of bytes in string or -1 if the string is NULL terminated.
INT32mergeMerge paths into a single vectors object.
INT32scaleScale the SVG to image dimensions.
Returns: nothing
This procedure works like gimp_path_import() but takes a string rather than reading the SVG from a file. This allows you to write scripts that generate SVG and feed it to GIMP.
Sven Neumann; 2005

gimp_path_list

Input:
IMAGEimageThe ID of the image to list the paths from
Returns:
INT32num_pathsThe number of paths returned.
STRINGARRAYpath_listList of the paths belonging to this image.
List the paths associated with the passed image.
Andy Thomas; 1999

gimp_path_set_current

Input:
IMAGEimageThe ID of the image in which a path will become current.
STRINGnameThe name of the path to make current.
Returns: nothing
Sets a named path as the current path.
Andy Thomas; 1999

gimp_path_set_locked

Input:
IMAGEimageThe image
STRINGnamethe name of the path whose locked status should be set
INT32lockedWhether the path is locked
Returns: nothing
This procedure sets the lock status associated with the specified path. A path can be "locked" which means that the transformation tool operations will also apply to the path.
Andy Thomas; 1999

gimp_path_set_points

Input:
IMAGEimageThe ID of the image to set the paths in.
STRINGnameThe name of the path to create. If it exists then a unique name will be created - query the list of paths if you want to make sure that the name of the path you create is unique. This will be set as the current path.
INT32ptypeThe type of the path. Currently only one type (1 = Bezier) is supported.
INT32num_path_pointsThe number of elements in the array, i.e. the number of points in the path * 3. Each point is made up of (x, y, type) of floats. Currently only the creation of bezier curves is allowed. The type parameter must be set to (1) to indicate a BEZIER type curve. Note that for BEZIER curves, points must be given in the following order: ACCACCAC... If the path is not closed the last control point is missed off. Points consist of three control points (control/anchor/control) so for a curve that is not closed there must be at least two points passed (2 x,y pairs). If (num_path_points/3) % 3 = 0 then the path is assumed to be closed and the points are ACCACCACCACC.
FLOATARRAYpoints_pairsThe points in the path represented as 3 floats. The first is the x pos, next is the y pos, last is the type of the pnt. The type field is dependant on the path type. For beziers (type 1 paths) the type can either be (1.0 = BEZIER_ANCHOR, 2.0 = BEZIER_CONTROL, 3.0= BEZIER_MOVE). Note all points are returned in pixel resolution.
Returns: nothing
Set the points associated with the named path.
Andy Thomas; 1999

gimp_path_set_tattoo

Input:
IMAGEimageThe image
STRINGnamethe name of the path whose tattoo should be set
INT32tattovalueThe tattoo associated with the name path. Only values returned from 'path_get_tattoo' should be used here
Returns: nothing
This procedure sets the tattoo associated with the specified path. A tattoo is a unique and permenant identifier attached to a path that can be used to uniquely identify a path within an image even between sessions. Note that the value passed to this function must have been obtained from a previous call to path_get_tattoo.
Andy Thomas; 1999

gimp_path_stroke_current

Input:
IMAGEimageThe ID of the image which contains the path to stroke.
Returns: nothing
Stroke the current path in the passed image.
Andy Thomas; 1999

gimp_path_to_selection

Input:
IMAGEimageThe image
STRINGnameThe name of the path which should be made into selection.
INT32opThe desired operation with current selection.
INT32antialiasAntialias selection.
INT32featherFeather selection.
SUCCESSfeather_radius_xFeather radius x.
SUCCESSfeather_radius_yFeather radius y.
Returns: nothing
This procedure renders the desired path into the current selection.
Joao S. O. Bueno; 2003

plug_in_sel2path

Input:
INT32run_modeInteractive, non-interactive
IMAGEimageInput image
DRAWABLEdrawableInput drawable (unused)
Returns: nothing
Converts a selection to a path
Andy Thomas; 1999

plug_in_sel2path_advanced

Input:
INT32run_modeInteractive, non-interactive
IMAGEimageInput image
DRAWABLEdrawableInput drawable (unused)
SUCCESSalign_thresholdalign_threshold
SUCCESScorner_always_thresholdcorner_always_threshold
PASS_THROUGHcorner_surroundcorner_surround
SUCCESScorner_thresholdcorner_threshold
SUCCESSerror_thresholderror_threshold
PASS_THROUGHfilter_alternative_surroundfilter_alternative_surround
SUCCESSfilter_epsilonfilter_epsilon
PASS_THROUGHfilter_iteration_countfilter_iteration_count
SUCCESSfilter_percentfilter_percent
PASS_THROUGHfilter_secondary_surroundfilter_secondary_surround
PASS_THROUGHfilter_surroundfilter_surround
PASS_THROUGHkeep_knees{1-Yes, 0-No}
SUCCESSline_reversion_thresholdline_reversion_threshold
SUCCESSline_thresholdline_threshold
SUCCESSreparameterize_improvementreparameterize_improvement
SUCCESSreparameterize_thresholdreparameterize_threshold
SUCCESSsubdivide_searchsubdivide_search
PASS_THROUGHsubdivide_surroundsubdivide_surround
SUCCESSsubdivide_thresholdsubdivide_threshold
PASS_THROUGHtangent_surroundtangent_surround
Returns: nothing
Converts a selection to a path (with advanced user menu)
Andy Thomas; 1999


The Gimp 2.3.2 (win32)Documentation fresh from PDB22:53:14 Fr 22.07.2005
Generated by pdb2doc.py written by Hans Breuer <Hans@Breuer.org>