Class GRectangle

This class represents a solid rectangle to draw on the screen. It is a subclass of GObject, and inherits all of its attributes and methods.

Constructor

GRectangle(**keywords)

Creates a new solid rectangle

To use the constructor for this class, you should provide it with a list of keyword arguments that initialize various attributes. For example, to create a red square centered at (0,0), use the constructor call:

GRectangle(x=0,y=0,width=10,height=10,fillcolor='red')

This class supports the all same keywords as GObject plus the additional keyword linewidth.

Parameter:keywords (keys are attribute names) – dictionary of keyword arguments

Attributes

This class has all of the attributes of GObject. In addition, it has the following new attributes.

linewidth

The width of the exterior line of this shape.

Setting this to 0 means that the rectangle has no border.

invariant: Value must be an int or float >= 0.

Methods

This class does not have any methods beyond those defined in GObject.