A class representing a box 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 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 | __str__ (self) |
| Returns a string that can be sent to the printer. | |
Public Attributes | |
| start | |
| end | |
| line_thickness | |
| corner_rounding | |
| ruler | |
Additional Inherited Members | |
Static Public Attributes inherited from LabelMaker.Interfaces.IShapes.IBox | |
| Optional | ruler [IRuler] |
| IPoint | start |
| IPoint | end |
| float | line_thickness |
| float | corner_rounding |
A class representing a box shape.
This class implements the IBox protocol and provides functionality for initializing, configuring, and describing a box shape for printing purposes. The box can be configured with start and end points, line thickness, and corner rounding.
| LabelMaker.PGL.Shapes.Box.__init__ | ( | self, | |
| Optional[IPoint] | start = None, | ||
| Optional[IPoint] | end = None, | ||
| float | line_thickness = 1.0 ) |
Initializes a new instance of the Box class with specified start and end points and line thickness.
| start | The starting point of the box. |
| end | The ending point of the box. |
| line_thickness | The thickness of the box's lines. |
| str LabelMaker.PGL.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.
| LabelMaker.PGL.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.
| 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. |
| LabelMaker.PGL.Shapes.Box.corner_rounding |
| LabelMaker.PGL.Shapes.Box.end |
| LabelMaker.PGL.Shapes.Box.line_thickness |
| LabelMaker.PGL.Shapes.Box.ruler |
| LabelMaker.PGL.Shapes.Box.start |