Welcome Installation Getting Started User Interaction Build a Game #1 Build a Game #2 Build a Game #3 Colours Coordinates API Reference Globals Window Camera Mouse Key Rect Image Text Shape Line Screen Sound Base

Rect

The Rect class is for rendering rectangles. It is a subclass of Base.

__init__(x = 0, y = 0, width = 50, height = 50, angle = 0, color = BLACK)

Call the rectangle initialiser.

  • x: float

    The x position of the rectangle

  • y: float

    The y position of the rectangle

  • width: float

    The width of the rectangle

  • height: float

    The height of the rectangle

  • angle: float

    The rotation of the rectangle

  • color: float, float, float, float

    The colour of the rectangle

width: float

The width of the rectangle.

height: float

The height of the rectangle.

size: float, float

The size of the rectangle.

  • x: float

    The width of the rectangle

  • y: float

    The height of the rectangle

Key Image