表示盒子形狀的類。 更多...
公開方法(Public Methods) | |
__init__ (self, Optional[IPoint] start=None, Optional[IPoint] end=None, float line_thickness=1.0) | |
使用指定的起始點和結束點及線條厚度初始化 Box 類的新實例。 | |
from_coordinates (cls, float x_start, float y_start, float x_end, float y_end, float line_thickness=1.0) | |
使用指定的起始和結束坐標及線條厚度初始化 Box 類的新實例。 | |
str | __str__ (self) |
返回一個可以發送到打印機的字符串。 | |
公開屬性 | |
start | |
end | |
line_thickness | |
corner_rounding | |
ruler | |
額外的繼承成員 | |
![]() | |
Optional | ruler [IRuler] |
IPoint | start |
IPoint | end |
float | line_thickness |
float | corner_rounding |
表示盒子形狀的類。
此類實現了 IBox 協議,並提供了用於初始化、配置和描述用於打印目的的盒子形狀的功能。 可以通過起始點和結束點、線條厚度和角圓度來配置盒子。
LabelMaker.PGL.Shapes.Box.__init__ | ( | self, | |
Optional[IPoint] | start = None, | ||
Optional[IPoint] | end = None, | ||
float | line_thickness = 1.0 ) |
使用指定的起始點和結束點及線條厚度初始化 Box 類的新實例。
start | 盒子的起始點。 |
end | 盒子的結束點。 |
line_thickness | 盒子線條的厚度。 |
str LabelMaker.PGL.Shapes.Box.__str__ | ( | self | ) |
返回一個可以發送到打印機的字符串。
此方法生成 Box 實例的字符串表示形式,該字符串已格式化並準備發送到打印機。 字符串包括所有打印所需的命令和數據。
LabelMaker.PGL.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.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 |