.. a7 Graphics Object class

.. _gobject-label:

Class GObject
=============
This class provides basic functionality for drawing to a :ref:`GView <gview-label>`.
You should never make a ``GObject`` directly.  Instead, you should use one of its
many subclasses: :ref:`GRectangle <grectangle-label>`, :ref:`GEllipse <gellipse-label>`, 
:ref:`GImage <gimage-label>`, :ref:`GLabel <glabel-label>`

While unsupported in the base class, most subclasses of ``GObject`` provide primitive 
collision detection via the ``contains`` method.  This method takes a :class:`Point2` 
object from the :mod:`cornell` module.

Constructor
-----------
.. autoclass:: game2d.GObject

Attributes
----------

.. currentmodule:: game2d
.. autoattribute:: GObject.x
.. autoattribute:: GObject.y
.. autoattribute:: GObject.left
.. autoattribute:: GObject.right
.. autoattribute:: GObject.bottom
.. autoattribute:: GObject.top
.. autoattribute:: GObject.linecolor
.. autoattribute:: GObject.fillcolor
.. autoattribute:: GObject.scale
.. autoattribute:: GObject.angle
.. autoattribute:: GObject.name

Methods
-------

.. automethod:: GObject.contains
.. automethod:: GObject.transform
.. automethod:: GObject.draw

:ref:`Return to top level <top-label>`