A class representing a text object for TSPL. More...
Public Member Functions | |
__init__ (self, Optional[ITextItem] text_item=None) | |
Initializes a new instance of the Text class. | |
str | __str__ (self) |
Returns a string that can be sent to the printer. | |
IFontSize | get_font_size_tspl (self, IFontSize font_size, FontSizeUnitsEnum font_units, Optional[IRuler] ruler) |
Calculates the font size based on the given font size units. | |
![]() | |
str | to_string_with_print_plane (self, Optional[object] print_plane) |
Converts the text object to a string with an optional print plane. | |
Public Attributes | |
reference_point | |
reverse | |
font_size_units | |
Additional Inherited Members | |
![]() | |
List | text [ITextItem] |
![]() | |
IRuler | ruler |
![]() | |
str | font_name |
![]() | |
FontStyleEnum | font_style |
![]() | |
FontSizeUnitsEnum | font_size_units |
![]() | |
RotateEnum | rotation |
A class representing a text object for TSPL.
This class inherits from AText and provides functionality for initializing and describing text objects in TSPL.
LabelMaker.TSPL.Text.Text.__init__ | ( | self, | |
Optional[ITextItem] | text_item = None ) |
Initializes a new instance of the Text class.
text_item | The text item to be used for initialization. |
Reimplemented from LabelMaker.Interfaces.IText.AText.
str LabelMaker.TSPL.Text.Text.__str__ | ( | self | ) |
Returns a string that can be sent to the printer.
This method generates a string representation of the Text instance that is formatted and ready to be sent to a printer. The string includes all the necessary commands and data required for printing in TSPL.
Reimplemented from LabelMaker.Interfaces.IText.AText.
IFontSize LabelMaker.TSPL.Text.Text.get_font_size_tspl | ( | self, | |
IFontSize | font_size, | ||
FontSizeUnitsEnum | font_units, | ||
Optional[IRuler] | ruler ) |
Calculates the font size based on the given font size units.
font_size | The font size to be converted. |
font_units | The units of the font size. |
ruler | The ruler used for scaling. |
LabelMaker.TSPL.Text.Text.font_size_units |
LabelMaker.TSPL.Text.Text.reference_point |
LabelMaker.TSPL.Text.Text.reverse |