| Mnemonics |
|
| GUI Display/Printer | ||||||||||||||||||||||||||||||
| Format | 'TEXT'(x,y[,x,y],text$,attrib$) Where:
|
|||||||||||||||||||||||||||||
| Description | Use
'TEXT' to draw (print) text in graphics
mode, starting at the point set by the first x,y
coordinates. Use graphical units or @X(col)
and @Y(line)
functions for the various coordinates. The 'TEXT'
mnemonic uses current 'FONT'
and colour attributes (i.e.,
'RED', 'BLUE', ...).
Use the optional second set of x,y parameters to define the bottom right corner of a rectangular region for displaying the text. You can use the functions TXH( ), and TXW( ), to make sure the text fits the region. |
|||||||||||||||||||||||||||||
| *Note* | For Windows printers, if the current background colour is white, the output will be considered transparent (i.e., with no background fill). | |||||||||||||||||||||||||||||
| Example | 0010
PRINT 'FONT'("MS Serif",-11) 0020 PRINT 'GREEN','TEXT'(240,420,"&Hello","&") |
|||||||||||||||||||||||||||||
| Block Printing | PxPlus provides a special attribute
string of "*TEXT" (or "*RTF")
to print blocks of text with word wrap to *WINPRT* and
*PDF* printed output (PDF output current only support
*TEXT, not *RTF). To use this Block print feature the 'TEXT' mnemonic allows the attribute string to contain "*TEXT" (or "*RTF") as follows:
This would take the string (simple text or RTF) and print it within the bouds of region specified on the printer. If *RTF the current font and colour setting would be ignored, if "*TEXT" the assumption would be Word wrap but use current font, colours, etc. Should the space required to print the output exceed the size of the region specified, the system will set the internal FIN value of "BYTESLEFT" to a non-zero value indicating how much of the data was not printed. If all the data was printed this value will be set to zero. By testing the value in BYTESLEFT the application can determine that the output did overflowed the region and can print issue a print with the attribute string of "*MORE". When specifying *MORE, the system will automatically resume printing the text where it left off. In addition the application does not need to send the text string again since the system will have already buffered the output data thus the output text string can be left blank (this will improve system throughput). For Example assuming that the string COMMENT$ has a long comment to be printed on a document and may potentially require multiple pages to output. The following logic could be used:
Block printing also returns the actual number of print lines that were used to print the data in the internal FIN value of "TEXTUSEDHEIGHT". This value can be used to determine the exact height of the data printed so that the application can determine where to resume printing at if it want to print below the text. A typical example of using these two fields would be in an form print program where you may have lines inter-mixed with comments, where the comments may be varying in length RTF text.
Block printing is a +PxPlus Exclusive |
|||||||||||||||||||||||||||||