graphinglib.Line#

class graphinglib.Line(pointA: tuple[float, float], pointB: tuple[float, float], color: str = 'default', width: float | Literal['default'] = 'default', capped_line: bool = False, cap_width: float | Literal['default'] = 'default')[source]#

This class implements a line object.

Parameters:
pointAtuple[float, float]

Point A of the line.

pointBtuple[float, float]

Point B of the line.

colorstr

Color of the line. Default depends on the figure_style configuration.

widthfloat, optional

Line width. Default depends on the figure_style configuration.

capped_linebool

If True, the line is capped on both ends. Defaults to False.

cap_widthfloat

Width of the caps. Default depends on the figure_style configuration.

Methods

__init__(pointA, pointB[, color, width, ...])

copy()

Returns a deep copy of the Line object.