表示 TSPL 线条对象的类。 更多...
Public 成员函数 | |
__init__ (self, IPoint start, IPoint end, float line_thickness) | |
使用指定的起点、终点和线条厚度初始化 Line 类的新实例。 | |
from_coordinates (cls, float x_start, float y_start, float x_end, float y_end, float line_thickness=1.0) | |
使用指定的起点和终点坐标及线条厚度初始化 Line 类的新实例。 | |
__str__ (self) | |
返回可以发送到印表机的字符串。 | |
Public 属性 | |
start | |
end | |
line_thickness | |
ruler | |
![]() | |
start | |
end | |
line_thickness | |
额外继承的成员函数 | |
![]() | |
Optional | ruler [IRuler] |
IPoint | start |
IPoint | end |
float | line_thickness |
表示 TSPL 线条对象的类。
该类继承自 ALine,并提供了在 TSPL 中初始化和描述线条对象的功能。
使用指定的起点、终点和线条厚度初始化 Line 类的新实例。
start | 线条的起始点。 |
end | 线条的结束点。 |
line_thickness | 线条的厚度。 |
LabelMaker.TSPL.Shapes.Line.__str__ | ( | self | ) |
返回可以发送到印表机的字符串。
此方法生成 Line 实例的字符串表示形式,格式化并准备好发送到印表机。字符串包括在 TSPL 中打印所需的所有命令和数据。
LabelMaker.TSPL.Shapes.Line.from_coordinates | ( | cls, | |
float | x_start, | ||
float | y_start, | ||
float | x_end, | ||
float | y_end, | ||
float | line_thickness = 1.0 ) |
使用指定的起点和终点坐标及线条厚度初始化 Line 类的新实例。
x_start | 起点的 x 坐标。 |
y_start | 起点的 y 坐标。 |
x_end | 终点的 x 坐标。 |
y_end | 终点的 y 坐标。 |
line_thickness | 线条的厚度。 |
LabelMaker.TSPL.Shapes.Line.end |
LabelMaker.TSPL.Shapes.Line.line_thickness |
LabelMaker.TSPL.Shapes.Line.ruler |
LabelMaker.TSPL.Shapes.Line.start |