Skip to content

textmode.js / Textmodifier / print

Method: print()

ts
print(
   str, 
   x, 
   y, 
   options?): void;

Print a string of text onto the active drawing layer.

Supports custom leading, letter spacing, tab size, and inline BBCode-style formatting tags like [fg=red], [bg=color], [inv], [rot=90], [fx], [fy], and their closing tags.

Parameters

ParameterTypeDescription
strstringThe text string to print.
xnumberCoordinate along the horizontal axis in cells.
ynumberCoordinate along the vertical axis in cells.
options?{ leading?: number; letterSpacing?: number; markup?: boolean; tabSize?: number; }Optional printing configurations.
options.leading?numberDistance between printed lines in cells.
options.letterSpacing?numberExtra horizontal spacing between characters in cells.
options.markup?booleanWhether to parse inline BBCode-style formatting tags.
options.tabSize?numberNumber of spaces used for tab characters.

Returns

void

Example