A class representing a line shape. More...
Public Member Functions | |
__init__ (self, Optional[IPoint] start=None, Optional[IPoint] end=None, float line_thickness=1.0) | |
Initializes a new instance of the Line class with specified start and end points and line thickness. | |
from_coordinates (cls, float x_start, float y_start, float x_end, float y_end, float line_thickness=1.0) | |
Initializes a new instance of the Line class with specified start and end coordinates and line thickness. | |
str | __str__ (self) |
Returns a string that can be sent to the printer. | |
Public Attributes | |
start | |
end | |
line_thickness | |
![]() | |
start | |
end | |
line_thickness | |
Additional Inherited Members | |
![]() | |
Optional | ruler [IRuler] |
IPoint | start |
IPoint | end |
float | line_thickness |
A class representing a line shape.
This class inherits from ALine and provides functionality for initializing, configuring, and describing a line for printing purposes. The line can be configured with start and end points and a specified line thickness.
LabelMaker.PGL.Shapes.Line.__init__ | ( | self, | |
Optional[IPoint] | start = None, | ||
Optional[IPoint] | end = None, | ||
float | line_thickness = 1.0 ) |
Initializes a new instance of the Line class with specified start and end points and line thickness.
start | The starting point of the line. |
end | The ending point of the line. |
line_thickness | The thickness of the line. |
Reimplemented from LabelMaker.Interfaces.IShapes.ALine.
str LabelMaker.PGL.Shapes.Line.__str__ | ( | self | ) |
Returns a string that can be sent to the printer.
This method generates a string representation of the Line instance that is formatted and ready to be sent to a printer. The string includes all the necessary commands and data required for printing.
Reimplemented from LabelMaker.Interfaces.IShapes.ALine.
LabelMaker.PGL.Shapes.Line.from_coordinates | ( | cls, | |
float | x_start, | ||
float | y_start, | ||
float | x_end, | ||
float | y_end, | ||
float | line_thickness = 1.0 ) |
Initializes a new instance of the Line class with specified start and end coordinates and line thickness.
x_start | The x-coordinate of the starting point. |
y_start | The y-coordinate of the starting point. |
x_end | The x-coordinate of the ending point. |
y_end | The y-coordinate of the ending point. |
line_thickness | The thickness of the line. |
LabelMaker.PGL.Shapes.Line.end |
LabelMaker.PGL.Shapes.Line.line_thickness |
LabelMaker.PGL.Shapes.Line.start |