CanvasRect


Description:

[ CCode ( has_construct_function = false , type = "GooCanvasItem*" ) ]
public CanvasRect (CanvasItem? parent, double x, double y, double width, double height, ...)

Creates a new rectangle item.

Here's an example showing how to create a rectangle at (100,100) with a width of 200 and a height of 100.

<informalexample><programlisting> GooCanvasItem *rect = goo_canvas_rect_new (mygroup, 100.0, 100.0, 200.0, 100.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.

x

the x coordinate of the left of the rectangle.

y

the y coordinate of the top of the rectangle.

width

the width of the rectangle.

height

the height of the rectangle.

...

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

Returns:

a new rectangle item.