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

Shape

The Shape class is for rendering polygons. It is a subclass of Base.

__init__(points = ((0, 25), (25, -25), (-25, -25)), x = 0, y = 0, angle = 0, color = BLACK)

Call the shape initialiser.

  • points: ((float, float), ...)

    The coordinates of the shape

  • x: float

    The x position of the shape

  • y: float

    The y position of the shape

  • angle: float

    The rotation of the shape

  • color: float, float, float, float

    The colour of the shape

points: ((float, float), ...)

The coordinates of the shape.

Text Line