Class GRectangle

GRectangle(**keywords)

Instances represent a solid rectangle.

The attributes x and y refer to the bottom left corner of the rectangle. The interior (fill) color of this rectangle is fillcolor, while linecolor is the color of the border.

For more fine-grained rectangle placement, you should make use of the attributes center_x, center_y, right, and top, all inherited from GObject. See that class for more information.

Constructor: creates a new solid rectangle

param keywords:dictionary of keyword arguments

Precondition: See below.

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 anchored at (0,0), use the constructor call

GRectangle(x=0,y=0,width=10,height=10,fillcolor=colormodel.RED)

This class supports the all same keywords as GObject.

This class is a subclass of GObject, and inherits all of its attributes and methods.

Attributes

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

Table Of Contents

Previous topic

Class GPolygon

Next topic

Class GEllipse

This Page