A class representing a box shape for TSPL.
More...
|
| | __init__ (self, IPoint start, IPoint end, float line_thickness) |
| | Initializes a new instance of the Box 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 Box class with specified start and end coordinates and line thickness.
|
| |
| | __str__ (self) |
| | Returns a string that can be sent to the printer.
|
| |
A class representing a box shape for TSPL.
This class implements the IBox protocol and provides functionality for initializing and describing a box in TSPL.
◆ __init__()
| LabelMaker.TSPL.Shapes.Box.__init__ |
( |
| self, |
|
|
IPoint | start, |
|
|
IPoint | end, |
|
|
float | line_thickness ) |
Initializes a new instance of the Box class with specified start and end points and line thickness.
- Parameters
-
| start | The starting point of the box. |
| end | The ending point of the box. |
| line_thickness | The thickness of the box's lines. |
- Returns
- A new instance of Box.
◆ __str__()
| LabelMaker.TSPL.Shapes.Box.__str__ |
( |
| self | ) |
|
Returns a string that can be sent to the printer.
This method generates a string representation of the Box instance that is formatted and ready to be sent to a printer. The string includes all the necessary commands and data required for printing in TSPL.
- Returns
- A string description of the Box instance.
◆ from_coordinates()
| LabelMaker.TSPL.Shapes.Box.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 Box class with specified start and end coordinates and line thickness.
- Parameters
-
| 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 box's lines. |
- Returns
- A new instance of Box.
◆ corner_rounding
| float LabelMaker.TSPL.Shapes.Box.corner_rounding = 0.0 |
◆ end
| LabelMaker.TSPL.Shapes.Box.end = end |
◆ line_thickness
| LabelMaker.TSPL.Shapes.Box.line_thickness = line_thickness |
◆ start
| LabelMaker.TSPL.Shapes.Box.start = start |
The documentation for this class was generated from the following file:
- /Users/bob_huang/Documents/Project/UniPRTSDK_python/LabelMaker/TSPL/Shapes.py