表示 TSPL 方框形狀的類。 更多...
公開方法(Public Methods) | |
| __init__ (self, IPoint start, IPoint end, float line_thickness) | |
| 使用指定的起點和終點及線條厚度初始化 Box 類的新實例。 | |
| from_coordinates (cls, float x_start, float y_start, float x_end, float y_end, float line_thickness=1.0) | |
| 使用指定的起點和終點坐標及線條厚度初始化 Box 類的新實例。 | |
| __str__ (self) | |
| 返回可以發送到打印機的字符串。 | |
公開屬性 | |
| start | |
| end | |
| line_thickness | |
| corner_rounding | |
| ruler | |
額外的繼承成員 | |
靜態公開屬性 繼承自 LabelMaker.Interfaces.IShapes.IBox | |
| Optional | ruler [IRuler] |
| IPoint | start |
| IPoint | end |
| float | line_thickness |
| float | corner_rounding |
表示 TSPL 方框形狀的類。
該類實現了 IBox 協議,並提供了在 TSPL 中初始化和描述方框的功能。
使用指定的起點和終點及線條厚度初始化 Box 類的新實例。
| start | 方框的起點。 |
| end | 方框的終點。 |
| line_thickness | 方框線條的厚度。 |
| LabelMaker.TSPL.Shapes.Box.__str__ | ( | self | ) |
返回可以發送到打印機的字符串。
此方法生成 Box 實例的字符串表示形式,格式化並準備好發送到打印機。字符串包括在 TSPL 中打印所需的所有命令和數據。
| LabelMaker.TSPL.Shapes.Box.from_coordinates | ( | cls, | |
| float | x_start, | ||
| float | y_start, | ||
| float | x_end, | ||
| float | y_end, | ||
| float | line_thickness = 1.0 ) |
使用指定的起點和終點坐標及線條厚度初始化 Box 類的新實例。
| x_start | 起點的 x 坐標。 |
| y_start | 起點的 y 坐標。 |
| x_end | 終點的 x 坐標。 |
| y_end | 終點的 y 坐標。 |
| line_thickness | 方框線條的厚度。 |
| LabelMaker.TSPL.Shapes.Box.corner_rounding |
| LabelMaker.TSPL.Shapes.Box.end |
| LabelMaker.TSPL.Shapes.Box.line_thickness |
| LabelMaker.TSPL.Shapes.Box.ruler |
| LabelMaker.TSPL.Shapes.Box.start |