Line

class Line(p1, p2)

An object representing a line connecting 2 points together.

Parameters
  • p1 – a tuple (x, y) with the 1st coordinate in world space

  • p2 – a tuple (x, y) with the 2nd coordinate in world space

Raises

TypeErrorp1 and p2 must be (x, y) tuples of numbers

set_color(*args) None

Sets the outline color of the line

Parameters

*args – a color or 2 colors corresponding to each vertex

Raises

TypeError – arguments must be colors

Return type

None

set_transparency(*args: float) None

Sets the transparency of the object

Parameters

*args (float) – a float or 2 floats corresponding to each vertex

Raises
  • TypeError – arguments must be floats

  • ValueError – transparency must be between 0 and 1

Return type

None