goocanvas.Rect

goocanvas.Rect — A rectangle item.

Synopsis

class goocanvas.Rect(goocanvas.ItemSimple):
    goocanvas.Rect(properties=None)

Ancestry

+-- gobject.GObject
	+-- goocanvas.ItemSimple
		+-- goocanvas.Rect

goocanvas.Rect Properties

"height"Read/WriteThe height of the rectangle. Allowed values: >= 0. Default value: 0.
"radius_x"Read/WriteThe horizontal radius to use for rounded corners. Allowed values: >= 0. Default value: 0.
"radius_y"Read/WriteThe vertical radius to use for rounded corners. Allowed values: >= 0. Default value: 0.
"width"Read/WriteThe width of the rectangle. Allowed values: >= 0. Default value: 0.
"x"Read/WriteThe x coordinate of the rectangle. Default value: 0.
"y"Read/WriteThe y coordinate of the rectangle. Default value: 0.

Implemented Interfaces

goocanvas.Rect implements goocanvas.Item

Description

goocanvas.Rect represents a rectangle item. It is a subclass of goocanvas.ItemSimple and so inherits all of the style properties such as "stroke-color", "fill-color" and "line-width". It also implements the goocanvas.Item interface, so you can use the goocanvas.Item functions such as goocanvas.Item.raise_() and goocanvas.Item.rotate()

Constructor

    goocanvas.Rect(properties=None)

properties :

A comma separated list of properties.

Returns :

A new goocanvas.Rect

Creates a new canvas rect item.

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

rect = goocanvas.Rect(x=100, y=100, width=200, height=100,
				stroke_color="red", fill_color="blue",
				line_width=5.0)