[Lazarus] How can I Backup and restore TCanvas class

FreeMan freeman35 at delphiturkiye.com
Wed Apr 16 14:21:35 CEST 2014


Hello,
I need backup active canvas, and when drawing and other codes finished, 
restore Canvas back. For this code, assign pointer just so
Canvas.Brush.Color := clRed; change ACanvas.Brush.Color too.
How can I Backup and restore TCanvas class ?
Regards

   ACanvas := Canvas;//Backup canvas info

    AText := C.Footer.DisplayText;
    OnRxColumnFooterDraw(Self, Canvas, R, C, AText);
    Canvas.FillRect(R);
    DrawCellGrid(i, 0, R, []);
    DrawCellText(i, 0, R, [], AText);

  Canvas:=ACanvas;//Restore canvas info





More information about the Lazarus mailing list