![]() |
![]() |
![]() |
GooCanvas Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties |
struct GooCanvasPath; GooCanvasItem * goo_canvas_path_new (GooCanvasItem *parent
,const gchar *path_data
,...
);
"data" gchar* : Write "height" gdouble : Read / Write "width" gdouble : Read / Write "x" gdouble : Read / Write "y" gdouble : Read / Write
GooCanvasPath represents a path item, which is a series of one or more lines, bezier curves, or elliptical arcs.
It is a subclass of GooCanvasItemSimple and so inherits all of the style properties such as "stroke-color", "fill-color" and "line-width".
It also implements the GooCanvasItem interface, so you can use the
GooCanvasItem functions such as goo_canvas_item_raise()
and
goo_canvas_item_rotate()
.
GooCanvasPath uses the same path specification strings as the Scalable Vector Graphics (SVG) path element. For details see the SVG specification.
To create a GooCanvasPath use goo_canvas_path_new()
.
To get or set the properties of an existing GooCanvasPath, use
g_object_get()
and g_object_set()
.
GooCanvasItem * goo_canvas_path_new (GooCanvasItem *parent
,const gchar *path_data
,...
);
Creates a new path item.
|
the parent item, or NULL . If a parent is specified, it will assume
ownership of the item, and the item will automatically be freed when it is
removed from the parent. Otherwise call g_object_unref() to free it. [skip]
|
|
the sequence of path commands, specified as a string using the same syntax as in the Scalable Vector Graphics (SVG) path element. |
|
optional pairs of property names and values, and a terminating NULL . |
Returns : |
a new path item. [transfer full] |
Here's an example showing how to create a red line from (20,20) to (40,40):
1 2 3 4 5 6 7 |