UniPRT SDK v2.0.0.0
 
载入中...
搜索中...
未找到
LabelMaker.TSPL.Text.Text类 参考

表示 TSPL 文字对象的类。 更多...

类 LabelMaker.TSPL.Text.Text 继承关系图:
LabelMaker.Interfaces.IText.AText LabelMaker.Interfaces.IText.IText LabelMaker.Interfaces.IText.ITextSettings LabelMaker.Interfaces.IFont.IFont LabelMaker.Interfaces.IFont.IFontStyle LabelMaker.Interfaces.IFont.IFontSizeUnits LabelMaker.Interfaces.ISettings.IRotation

Public 成员函数

 __init__ (self, Optional[ITextItem] text_item=None)
 初始化 Text 类的新实例。
 
str __str__ (self)
 返回可以发送到打印机的字符串。
 
IFontSize get_font_size_tspl (self, IFontSize font_size, FontSizeUnitsEnum font_units, Optional[IRuler] ruler)
 根据给定的字体大小单位计算字体大小。
 
- Public 成员函数 继承自 LabelMaker.Interfaces.IText.AText
 __init__ (self, Optional[ITextItem] text_item=None)
 初始化带有可选文本项的文本对象。
 
str __str__ (self)
 返回文本对象的字符串表示形式。
 
str to_string_with_print_plane (self, Optional[object] print_plane)
 将文本对象转换为带有可选打印平面的字符串。
 
- Public 成员函数 继承自 LabelMaker.Interfaces.IText.IText
str __str__ (self)
 

Public 属性

 reference_point = TSPLReferencePoint.LEFT_DOWN
 
bool reverse = False
 
- Public 属性 继承自 LabelMaker.Interfaces.IText.AText
Optional[IRulerruler = None
 
Optional[str] font_name = None
 
str font_style = FontStyleEnum.NORMAL
 
str font_size_units = FontSizeUnitsEnum.POINTS
 
str alignment = AlignEnum.DEFAULT
 
str rotation = RotateEnum.NONE
 

额外继承的成员函数

- 静态 Public 属性 继承自 LabelMaker.Interfaces.IText.IText
List text [ITextItem]
 

详细描述

表示 TSPL 文字对象的类。

该类继承自 AText,并提供了在 TSPL 中初始化和描述文字对象的功能。

构造及析构函数说明

◆ __init__()

LabelMaker.TSPL.Text.Text.__init__ ( self,
Optional[ITextItem] text_item = None )

初始化 Text 类的新实例。

参数
text_item用于初始化的文本项。
返回
Text 的新实例。

成员函数说明

◆ __str__()

str LabelMaker.TSPL.Text.Text.__str__ ( self)

返回可以发送到打印机的字符串。

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

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

◆ get_font_size_tspl()

IFontSize LabelMaker.TSPL.Text.Text.get_font_size_tspl ( self,
IFontSize font_size,
FontSizeUnitsEnum font_units,
Optional[IRuler] ruler )

根据给定的字体大小单位计算字体大小。

参数
font_size要转换的字体大小。
font_units字体大小的单位。
ruler用于缩放的标尺。
返回
计算出的字体大小。

类成员变量说明

◆ reference_point

LabelMaker.TSPL.Text.Text.reference_point = TSPLReferencePoint.LEFT_DOWN

◆ reverse

bool LabelMaker.TSPL.Text.Text.reverse = False

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