Function TWPRTFEnginePaint.PaintSinglePar(par:TWPTextStyle; toCanvas:TCanvas; r:TRect; xres:Integer; yres:Integer; text:string; IgnoreFontColor:Boolean) : Integer

Unit: WPRTEPaint
Class: WPRTEPaint.TWPRTFEnginePaint

Parameters

  • par:TWPTextStyle
  • toCanvas:TCanvas
  • r:TRect
  • xres:Integer
  • yres:Integer
  • text:string
  • IgnoreFontColor:Boolean

Returns

The type of the result value is Integer.

Description

This procedure paints a paragraph on a certain drawing surface.
You can specify the X and Y resolution to provide scaling. The paragraph will (currently) not be wrapped. This procedure is usually only used to create a textstyle preview functionality. The result is the height of the printed text. The function works internally with a copy of the passed paragraph which is painted in the context of the current RTFData object but not linked to it. The function can also be called with a TWPTextStyle object and the text.
If IgnoreFontColor=true the current canvas font color will not be changed