Class GEllipse

class graphics.GEllipse(**keywords)

Instance represents a solid ellipse in GameView

The ellipse is the largest one that can be drawn inside of a rectangle whose bottom left corner is given by pos and whose width and height are given by size. The interior (fill) color of this rectangle is fillcolor, while linecolor is the color of the border.

For more fine-grained rectangle placement, you should make use of the attributes center, center_x, center_y, right, and top, all inherited from GObject. See that class for more.

Constructor: creates a new ellipse.

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 create an circle centered at (0,0) with radius 10, use the constructor call

GEllipse(center=(0,0),size=(20,20))

Note that we specify ellipse size by diameter, not radius This class supports the same keywords as GObject.

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

Attributes

This class does not have any attributes beyond those defined in GObject.

Table Of Contents

Previous topic

Class GRectangle

Next topic

Class GImage

This Page