Class GImage


Instance represents a rectangular image.

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.

In this graphics object, the linecolor and fillcolor attributes are ignored. The image is displayed as a rectangle whose bottom left corner is defined by the attributes x and y. If the attributes width and height do not agree with the actual size of the image, the image is scaled to fit.

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: creates a new rectangle image

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, load the image beach-ball.png, use the constructor


This class supports the all same keywords as GRectangle, though the color keywords are ignored.

This class is a subclass of GObject, and inherits all of its attributes and methods.


These attributes are in addition to those from GObject.


File name of a source file for this image.

Invariant: Must be a string or None. Default is None.

This attribute is ignored.


This attribute is ignored.

Table Of Contents

Previous topic

Class GEllipse

Next topic

Class GLabel

This Page