#include <path-def.h>
Public Member Functions | |
void | reference () const |
void | unreference () const |
GnomeCanvasPathDef * | gobj () |
Provides access to the underlying C instance. | |
const GnomeCanvasPathDef * | gobj () const |
Provides access to the underlying C instance. | |
GnomeCanvasPathDef * | gobj_copy () const |
Glib::RefPtr< PathDef > | open_parts () |
This function creates a new GnomeCanvasPathDef that contains all of the open segments on the passed path . | |
Glib::RefPtr< PathDef > | closed_parts () |
This function returns a new GnomeCanvasPathDef that contains the all of close parts of passed path . | |
Glib::RefPtr< PathDef > | close_all () |
This function closes all of the open segments in the passed path and returns a new GnomeCanvasPathDef. | |
void | finish () |
Trims dynamic point array to exact length of path. | |
void | ensure_space (int space) |
This function ensures that enough space for space points is allocated at the end of the path. | |
void | reset () |
This function clears the contents of the passed path . | |
void | moveto (double x, double y) |
This function adds starts new subpath on path , and sets its starting point to x and y . | |
void | lineto (double x, double y) |
This function add a line segment to the passed path with the specified x and y coordinates. | |
void | lineto_moving (double x, double y) |
This functions adds a new line segment with loose endpoint to the path, or if endpoint is already loose, changes its coordinates to x , y . | |
void | curveto (double x1, double y1, double x2, double y2, double x3, double y3) |
This function adds a bezier curve segment to the path definition. | |
void | closepath () |
This function closes the last subpath of path , adding a ART_LINETO to subpath starting point, if needed and changing starting pathcode to ART_MOVETO. | |
void | closepath_current () |
This function closes the last subpath by setting the coordinates of the endpoint of the last segment (line or curve) to starting point. | |
Gnome::Art::Point | currentpoint () const |
ArtBpath * | get_bpath () const |
This function returns a ArtBpath that consists of the path definition. | |
ArtBpath * | first_bpath () const |
This function returns the first ArtBpath point in the definition. | |
ArtBpath * | last_bpath () const |
This function returns pointer to the last ArtBpath segment in the path definition. | |
bool | is_empty () const |
This function is a boolean test to see if the path is empty, meaning containing no line segments. | |
int | length () const |
This function returns the length of the path definition. | |
bool | has_currentpoint () const |
This function is a boolean test checking to see if the path has a current point defined. | |
bool | any_open () const |
This function returns a boolean value indicating if the path has any open segments. | |
bool | all_open () const |
This function returns a boolean value indicating if the path only contains open segments. | |
bool | any_closed () const |
This function returns a boolean valid indicating if the path has any closed segements. | |
bool | all_closed () const |
This function returns a boolean value indicating if the path only contains closed segments. | |
Static Public Member Functions | |
Glib::RefPtr< PathDef > | create () |
Glib::RefPtr< PathDef > | create (int length) |
This funtion creates a new #gnome_canvas_path_def with length number of points allocated. | |
Glib::RefPtr< PathDef > | create (ArtBpath &bpath) |
This function constructs a new #gnome_canvas_path_def and uses the passed bpath as the contents. | |
Protected Member Functions | |
PathDef () | |
void | operator delete (void *, size_t) |
Related Functions | |
(Note that these are not member functions.) | |
Glib::RefPtr< Gnome::Canvas::PathDef > | wrap (GnomeCanvasPathDef *object, bool take_copy=false) |
|
|
|
This function returns a boolean value indicating if the path only contains closed segments.
|
|
This function returns a boolean value indicating if the path only contains open segments.
|
|
This function returns a boolean valid indicating if the path has any closed segements.
|
|
This function returns a boolean value indicating if the path has any open segments.
|
|
This function closes all of the open segments in the passed path and returns a new GnomeCanvasPathDef.
|
|
This function returns a new GnomeCanvasPathDef that contains the all of close parts of passed path .
|
|
This function closes the last subpath of path , adding a ART_LINETO to subpath starting point, if needed and changing starting pathcode to ART_MOVETO.
|
|
This function closes the last subpath by setting the coordinates of the endpoint of the last segment (line or curve) to starting point.
|
|
This function constructs a new #gnome_canvas_path_def and uses the passed bpath as the contents. The passed bpath should not be static as the path definition is editable when constructed with this function. Also, passed bpath will be freed with art_free, if path is destroyed, so use it with caution. For constructing a #gnome_canvas_path_def from (non-modifiable) bpath use #gnome_canvas_path_def_new_from_static_bpath.
|
|
This funtion creates a new #gnome_canvas_path_def with length number of points allocated. It is useful, if you know the exact number of points in path, so you can avoid automatic point array reallocation.
|
|
|
|
|
|
This function adds a bezier curve segment to the path definition.
|
|
This function ensures that enough space for space points is allocated at the end of the path.
|
|
Trims dynamic point array to exact length of path.
|
|
This function returns the first ArtBpath point in the definition.
|
|
This function returns a ArtBpath that consists of the path definition.
|
|
Provides access to the underlying C instance.
|
|
Provides access to the underlying C instance.
|
|
|
|
This function is a boolean test checking to see if the path has a current point defined. Current point will be set by line operators, and cleared by closing subpath.
|
|
This function is a boolean test to see if the path is empty, meaning containing no line segments.
|
|
This function returns pointer to the last ArtBpath segment in the path definition.
|
|
This function returns the length of the path definition. Not Euclidian length of the path but rather the number of points on the path.
|
|
This function add a line segment to the passed path with the specified x and y coordinates.
|
|
This functions adds a new line segment with loose endpoint to the path, or if endpoint is already loose, changes its coordinates to x , y . You can change the coordinates of loose endpoint as many times as you want, the last ones set will be fixed, if you continue line. This is useful for handling drawing with mouse.
|
|
This function adds starts new subpath on path , and sets its starting point to x and y . If current subpath is empty, it simply changes its starting coordinates to new values.
|
|
This function creates a new GnomeCanvasPathDef that contains all of the open segments on the passed path .
|
|
|
|
|
|
This function clears the contents of the passed path .
|
|
|
|
|