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

Line

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

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

Call the line initialiser.

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

    The coordinates of the line

  • x: float

    The x position of the line

  • y: float

    The y position of the line

  • angle: float

    The rotation of the line

  • color: float, float, float, float

    The colour of the line

width: float

The thickness of the line.

loop: True

When True, the line is a closed loop.

miter: float

The miter limit for the line. When miter is 0, the line is beveled.

Shape Screen