Function TWPCustomRtfEdit.Draw(outCanvas:TCanvas; X:Integer; Y:Integer; H:Integer; xres:Integer; yres:Integer; starty:Integer; HandlePageBreaks:Boolean) : Integer
Unit: WPCTRMemo
Class: WPCTRMemo.TWPCustomRtfEdit
Parameters
-
outCanvas:TCanvas X:Integer Y:Integer H:Integer xres:Integer yres:Integer starty:Integer HandlePageBreaks:Boolean
Returns
The type of the result value is Integer.
Description
Draw will render the text using the same word wrap as it is used in the editor. It is used to fill rectangles vertically with text. A new rectangle can be started when the text was not completely printed.var y : Integer; r : TRect; begin y := 0; r.Left := 10; r.Top := 10; r.Right := PaintBox1.Width - 20; r.Bottom := PaintBox1.Height - 20; y := WPRichText1.Memo.Draw(PaintBox1.Canvas, r.Left+1,r.Top,r.Right - r.Left,r.Bottom-r.Top, 50, 50,y, false); if y>0 then WPRichText1.Memo.Draw(PaintBox1.Canvas, r.Left+(r.Right-r.Left) div 2,r.Top,r.Bottom-r.Top, 50, 50,y, false); end;Overloaded Methods
Function TWPCustomRtfEdit.Draw(outCanvas:TCanvas; r:TRect; zoom:Integer; starty:Integer; HandlePageBreaks:Boolean) : Integer |