|  |  |  | GooCanvas Reference Manual |  | 
|---|---|---|---|---|
                    GooCanvasRect;
GooCanvasItem*      goo_canvas_rect_new                 (GooCanvasItem *parent,
                                                         gdouble x,
                                                         gdouble y,
                                                         gdouble width,
                                                         gdouble height,
                                                         ...);
"height" gdouble : Read / Write "radius-x" gdouble : Read / Write "radius-y" gdouble : Read / Write "width" gdouble : Read / Write "x" gdouble : Read / Write "y" gdouble : Read / Write
GooCanvasRect represents a rectangle item.
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().
To create a GooCanvasRect use goo_canvas_rect_new().
To get or set the properties of an existing GooCanvasRect, use
g_object_get() and g_object_set().
typedef struct _GooCanvasRect GooCanvasRect;
The GooCanvasRect struct contains private data only.
GooCanvasItem* goo_canvas_rect_new (GooCanvasItem *parent, gdouble x, gdouble y, gdouble width, gdouble height, ...);
Creates a new rectangle 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 callg_object_unref()to free it. | 
| 
 | the x coordinate of the left of the rectangle. | 
| 
 | the y coordinate of the top of the rectangle. | 
| 
 | the width of the rectangle. | 
| 
 | the height of the rectangle. | 
| 
 | optional pairs of property names and values, and a terminating NULL. | 
| Returns : | 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.
 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);
"height" property"height" gdouble : Read / Write
The height of the rectangle.
Allowed values: >= 0
Default value: 0
"radius-x" property"radius-x" gdouble : Read / Write
The horizontal radius to use for rounded corners.
Allowed values: >= 0
Default value: 0
"radius-y" property"radius-y" gdouble : Read / Write
The vertical radius to use for rounded corners.
Allowed values: >= 0
Default value: 0
"width" property"width" gdouble : Read / Write
The width of the rectangle.
Allowed values: >= 0
Default value: 0