Base graphics object for a GameView class.
You should never make a GObject directly. Instead, you should use one of the subclasses: GRectangle, GEllipse, GLine, GImage, and GLabel.
Constructor: creates a new graphics object.
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 initialize the x position and the fill color, use the constructor call
GObject(x=2,fillcolor=colormodel.RED)
You do not need to provide the keywords as a dictionary. The ** in the parameter keywords does that automatically.
Any attribute of this class may be used as a keyword. The argument must satisfy the invariants of that attribute. See the list of attributes of this class for more information.
This class is a subclass of Widget from Kivy, and inherits all of its attributes and methods.
The object line color.
Used to color the foreground, text, or, in the case of solid shapes, the shape border.
Invariant: Must be an RGB or HSV object from module colormodel.
The object fill color.
Used to color the backgrounds or, in the case of solid shapes, the shape interior.
Invariant: Must be an RGB or HSV object from module colormodel.
The center position of this graphics object.
Invariant: A tuple of the attributes (center_x, center_y). Hence changing this attribute will change those attributes. The elements of the tuple must be numbers (int or float).
The x coordinate of the center of this graphics object.
Invariant: Must be equal to (x + width / 2). Hence changing this attribute will change those attributes. The value must be a number (int or float).
The y coordinate of the center of this graphics object.
Invariant: Must be equal to (y + height / 2). Hence changing this attribute will change those attributes. The value must be a number (int or float).
The height of this graphics object.
Invariant: Must be a non-negative number (int or float). Default value is 100.
The position of this graphics object.
Invariant: A tuple of the attributes (x, y). Hence changing this attribute will change those attributes. The elements of the tuple must be numbers (int or float).
The position of the right this graphics object.
Invariant: Must be equal to (x + width). Hence changing this attribute will change those attributes. The value must be a number (int or float).
The size of this graphics object.
Invariant: A tuple of the attributes (width, height). Hence changing this attribute will change those attributes. The elements of the tuple must be numbers (int or float).
The position of the top of this graphics object.
Invariant: Must be equal to (y + height). Hence changing this attribute will change those attributes. The value must be a number (int or float).
The width of this graphics object.
Invariant: Must be a non-negative number (int or float). Default value is 100.
The x position of this graphics object (specifically, the lower left corner).
Invariant: Must be a non-negative number (int or float). Default value is 0.
The y position of this graphics object (specifically, the lower left corner).
Invariant: Must be a non-negative number (int or float). Default value is 0.
These methods are all inherited from the base class Widget provided in Kivy. You should use them to determine whether or not two graphics objects have collided.
Returns True if (x,y) is inside this graphics object; False otherwise.
The graphics object is defined by the rectangle whose bottom left corner is at pos, and which has the the same width and height as this object. This method checks if (x,y) is in this region.
This method does nothing.
It has been disabled so that you implement this functionality in the way specified in the assignment.