Please enable JavaScript to view this site.

Updated September 2024

//TEXTOUT, x, y, text

TEXTOUT outputs a line of text starting at the specified position.

Parameter

Description

x

Starting horizontal position, using the current mapping units. Note that -1 may be used to specify the current position; this can be useful when you don't know the position.

y

Starting vertical position, using the current mapping units. Note that the position marks the upper right corner of the cell in which the first character is printed. This is usually a few pixels above the tops of the letters. Also note that -1 may be used to specify the current position; this can be useful when you don't know the position.

text

A string of text to output, up to a maximum of 16K for the complete directive (after expansion of any variables). It is not necessary to quote this argument, even if it contains embedded commas. A trailing backslash will cause the next line to be concatenated to the text, unless the next line starts with a forward slash. For a literal trailing backslash, you may quote the text string. See explanatory note under TEXTINDENT and History note below.

 

For information on printing special characters and symbols, see Printing Special Symbols.

Comments

TEXTOUT does not change the current print cursor position.

Ordinary text lines in the print file are essentially processed as if they were preceded by TEXTOUT,-1,-1, (i.e. x and y set to the current position), except:

Unlike "real" TEXTOUT directives, ordinary text lines do update the current position. Normally this will be the first position on the next line, based on the current vertical motion index as set by the last SETVMI or RESETLPP directive, unless the line ends with "\" (see next).
Ordinary text lines that end in "\", the current position is set just past the last character on the line.

Like nearly all printer output, TEXOUT directives and ordinary text lines print in the current font, using the current pen.

For simple cases of changing fonts in the middle of a line, the "\" technique mentioned above works reasonably well. See the sample GDI printfile in Writing GDI Print Directives for an example. But for more complex formatted printing with many font, color, and other changes mid-line or mid-paragraph, XTEXT will be much more efficient.

See Also

History

2024 September, A-Shell 7.0.1762:  Add support for special handling of trailing backslash in //TEXTxxx directives. Previously it was only recognized as a special character in plain text outside of GDI directives.

Created with Help+Manual 9 and styled with Premium Pack Version 5 © by EC Software