.. a7 Graphics Object class .. _gimage-label: Class GImage ============ The class provides support for drawing an image file. The image is given by a JPEG, PNG, or GIF file whose name is stored in the attribute ``source``. Image files should be stored in the **Images** directory so that Kivy can find them without the complete path name. This class acts much like is parent :ref:`GRectangle` and shares all of the same properties. As with that class, you can add a border to the rectangle if you want, using the attribute ``linewidth``. If the attributes ``width`` and ``height`` do not agree with the actual size of the image, the image is scaled to fit. Furthermore, if you define `fillcolor`, Kivy will tint your image by the given color. If the image supports transparency, then this object can be used to represent irregular shapes. However, the `contains` method still treats this shape as a rectangle. Constructor ----------- .. autoclass:: game2d.grectangle.GImage Attributes ---------- This class has all of the attributes of :ref:`GRectangle `. In addition, it has the following new attributes. .. currentmodule:: game2d.grectangle .. autoattribute:: GImage.source Methods ------- This class does not have any methods beyond those defined in :ref:`GObject `. :ref:`Return to top level `