CanvasPolyline


Description:

[ CCode ( has_construct_function = false , type = "GooCanvasItem*" ) ]
public CanvasPolyline (CanvasItem? parent, bool close_path, int num_points, ...)

Creates a new polyline item.

Here's an example showing how to create a filled triangle with vertices at (100,100), (300,100), and (200,300).

<informalexample><programlisting> GooCanvasItem *polyline = goo_canvas_polyline_new (mygroup, TRUE, 3, 100.0, 100.0, 300.0, 100.0, 200.0, 300.0, "stroke-color", "red", "line-width", 5.0, "fill-color", "blue", NULL); </programlisting></informalexample>

Parameters:

parent

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 unref to free it.

close_path

if the last point should be connected to the first.

num_points

the number of points in the polyline.

...

the pairs of coordinates for each point in the line, followed by optional pairs of property names and values, and a terminating null.

Returns:

a new polyline item.