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¶
-
class
game2d.grectangle.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
GObjectplus the additional keywordlinewidth.- Parameters
keywords (keys are attribute names) – dictionary of keyword arguments