CanvasPolylineModel.line


Description:

[ CCode ( has_construct_function = false , type = "GooCanvasItemModel*" ) ]
public CanvasPolylineModel.line (CanvasItemModel? parent, double x1, double y1, double x2, double y2, ...)

Creates a new polyline model with a single line.

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

<informalexample><programlisting> GooCanvasItemModel *polyline = goo_canvas_polyline_model_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 model, 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 model.