CanvasPolyline.line


Description:

[ CCode ( has_construct_function = false , type = "GooCanvasItem*" ) ]
public CanvasPolyline.line (CanvasItem? parent, double x1, double y1, double x2, double y2, ...)

Creates a new polyline item with a single line.

Here's an example showing how to create a line from (100,100) to (300,300).

<informalexample><programlisting> GooCanvasItem *polyline = goo_canvas_polyline_new_line (mygroup, 100.0, 100.0, 300.0, 300.0, "stroke-color", "red", "line-width", 5.0, NULL); </programlisting></informalexample>

Parameters:

parent

the parent item, or null.

x1

the x coordinate of the start of the line.

y1

the y coordinate of the start of the line.

x2

the x coordinate of the end of the line.

y2

the y coordinate of the end of the line.

...

optional pairs of property names and values, and a terminating null.

Returns:

a new polyline item.