Class GRectangle

class graphics.GRectangle(**keywords)

Instance represents a solid rectangle in GameView

The bottom left corner of the rectangle is given by pos and the width and height are given by size. 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, center_x, center_y, right, and top, all inherited from GObject. See that class for more.

Constructor: creates a new 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 rectangle with corners points (0,0), (0,2), (1,2), and (1,0), use the constructor call

GRectangle(pos=(0,0),size=(1,2))

This class supports the 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 GTriangle

Next topic

Class GEllipse

This Page