UniPRT SDK v1.0.0.0
 
Loading...
Searching...
No Matches
LabelMaker.TSPL.Text.Text Class Reference

A class representing a text object for TSPL. More...

Inheritance diagram for 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 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.
 
- Public Member Functions inherited from LabelMaker.Interfaces.IText.AText
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

- Static Public Attributes inherited from LabelMaker.Interfaces.IText.IText
List text [ITextItem]
 
- Static Public Attributes inherited from LabelMaker.Interfaces.IText.ITextSettings
IRuler ruler
 
- Static Public Attributes inherited from LabelMaker.Interfaces.IFont.IFont
str font_name
 
- Static Public Attributes inherited from LabelMaker.Interfaces.IFont.IFontStyle
FontStyleEnum font_style
 
- Static Public Attributes inherited from LabelMaker.Interfaces.IFont.IFontSizeUnits
FontSizeUnitsEnum font_size_units
 
- Static Public Attributes inherited from LabelMaker.Interfaces.ISettings.IRotation
RotateEnum rotation
 

Detailed Description

A class representing a text object for TSPL.

This class inherits from AText and provides functionality for initializing and describing text objects in TSPL.

Constructor & Destructor Documentation

◆ __init__()

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

Initializes a new instance of the Text class.

Parameters
text_itemThe text item to be used for initialization.
Returns
A new instance of Text.

Reimplemented from LabelMaker.Interfaces.IText.AText.

Member Function Documentation

◆ __str__()

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.

Returns
A string description of the Text instance.

Reimplemented from LabelMaker.Interfaces.IText.AText.

◆ get_font_size_tspl()

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.

Parameters
font_sizeThe font size to be converted.
font_unitsThe units of the font size.
rulerThe ruler used for scaling.
Returns
The calculated font size.

Member Data Documentation

◆ font_size_units

LabelMaker.TSPL.Text.Text.font_size_units

◆ reference_point

LabelMaker.TSPL.Text.Text.reference_point

◆ reverse

LabelMaker.TSPL.Text.Text.reverse

The documentation for this class was generated from the following file: