UniPRT SDK v2.0.0.0
 
Loading...
Searching...
No Matches
LabelMaker.PGL.Shapes.Line Class Reference

A class representing a line shape. More...

Inheritance diagram for LabelMaker.PGL.Shapes.Line:
LabelMaker.Interfaces.IShapes.ALine LabelMaker.Interfaces.IShapes.ILine

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 Member Functions inherited from LabelMaker.Interfaces.IShapes.ALine
 __init__ (self, IPoint start, IPoint end, float line_thickness)
 Initializes a Line with a start point, end point, and line thickness.
 
str __str__ (self)
 Returns a string representation of the line.
 

Additional Inherited Members

- Public Attributes inherited from LabelMaker.Interfaces.IShapes.ALine
 start = start
 
 end = end
 
 line_thickness = line_thickness
 
- Static Public Attributes inherited from LabelMaker.Interfaces.IShapes.ILine
Optional ruler [IRuler]
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ __init__()

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.

Parameters
startThe starting point of the line.
endThe ending point of the line.
line_thicknessThe thickness of the line.

Member Function Documentation

◆ __str__()

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.

Returns
A string description of the Line instance.

◆ from_coordinates()

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.

Parameters
x_startThe x-coordinate of the starting point.
y_startThe y-coordinate of the starting point.
x_endThe x-coordinate of the ending point.
y_endThe y-coordinate of the ending point.
line_thicknessThe thickness of the line.
Returns
A new instance of Line.

The documentation for this class was generated from the following file: