TSRichViewEdit.ZoomCanvas, RestoreCanvasZoom

<< Click to display table of contents >>

TSRichViewEdit.ZoomCanvas, RestoreCanvasZoom

Applies and restores zooming to the Canvas.

function ZoomCanvas(Canvas : TCanvas;

  ScaleX, ScaleY : Single) : TSRVZoomInfo;

procedure RestoreCanvasZoom(Canvas : TCanvas;

  OldInfo : TSRVZoomInfo);

type

  TSRVZoomInfo = record ...

After calling ZoomCanvas, all subsequent drawing on Canvas will be scaled by ScaleX horizontally and by ScaleY vertically. Store the returned value and then call RestoreCanvasZoom to restore the original zooming.

These methods may be useful in OnPaint event, if you want to draw something in the same zooming ratio as pages (use ViewProperty.ZoomPercent * 0.01 as ScaleX and ScaleY parameters).