RTF:DrawText() Method
<< Click to Display Table of Contents >> RTF:DrawText() Method |
![]() ![]() ![]() |
Purpose
To draw a previously loaded RTF stream on a PtrDevice or RpPrinter. Note: The PtrDevice or RpPrinter must be in the preview or print mode before this method is called.
Syntax
<oRTF>:DrawText(oPtrDevice, [nY], [nX], [nHeight], [nWidth], [nStartChar], [lPrint])
Arguments
oPtrDevice |
PtrDevice or RpPrinter to draw the RTF text onto. |
nY |
Optional. The top row (in logical pixels) of the text. The default is 0. |
nX |
Optional. The left column (in logical pixels) of the text. The default is 0. |
nHeight |
Optional. The height (in logical pixels) of the rectangle bounding the text. The default is oPtrDevice:LogPrintAreaLength-nY. |
nWidth |
Optional. The width (in logical pixels) of the rectangle bounding the text. The default is oPtrDevice:LogPrintAreaWidth-nX. |
nStartChar |
Optional. The character to start printing at. The default is the first character. |
lPrint |
Optional. TRUE to actually print the text. FALSE to calculate the area used by the text. If FALSE, the RTF class will calculate the vertical area consumed by the text given a fixed nWidth. It also will calculate the last character printed. Retrieve these values via LastPrintedRow and LastPrintedChar accesses. |
Example
// Draw RTF on a RpPrinter.
if oRTF:LoadRTFFromFile("C:\RP2\RPWP.RTF")
oRTF:DrawText(oRpPrinter)
endif
oRTF:Destroy()