UniPRT SDK v1.0.0.0
 
载入中...
搜索中...
未找到
LabelMaker.PGL.Shapes.Box类 参考

表示盒子形状的类。 更多...

类 LabelMaker.PGL.Shapes.Box 继承关系图:
LabelMaker.Interfaces.IShapes.IBox

Public 成员函数

 __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)
 返回一个可以发送到印表机的字符串。
 

Public 属性

 start
 
 end
 
 line_thickness
 
 corner_rounding
 
 ruler
 

额外继承的成员函数

- 静态 Public 属性 继承自 LabelMaker.Interfaces.IShapes.IBox
Optional ruler [IRuler]
 
IPoint start
 
IPoint end
 
float line_thickness
 
float corner_rounding
 

详细描述

表示盒子形状的类。

此类实现了 IBox 协议,并提供了用于初始化、配置和描述用于打印目的的盒子形状的功能。 可以通过起始点和结束点、线条厚度和角圆度来配置盒子。

构造及析构函数说明

◆ __init__()

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__()

str LabelMaker.PGL.Shapes.Box.__str__ ( self)

返回一个可以发送到印表机的字符串。

此方法生成 Box 实例的字符串表示形式,该字符串已格式化并准备发送到印表机。 字符串包括所有打印所需的命令和数据。

返回
Box 实例的字符串描述。

◆ from_coordinates()

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盒子线条的厚度。
返回
Box 类的新实例。

类成员变量说明

◆ corner_rounding

LabelMaker.PGL.Shapes.Box.corner_rounding

◆ end

LabelMaker.PGL.Shapes.Box.end

◆ line_thickness

LabelMaker.PGL.Shapes.Box.line_thickness

◆ ruler

LabelMaker.PGL.Shapes.Box.ruler

◆ start

LabelMaker.PGL.Shapes.Box.start

该类的文档由以下文件生成: