[Lazarus] How can I Backup and restore TCanvas class

FreeMan freeman35 at delphiturkiye.com
Wed Apr 16 15:01:02 CEST 2014


This is RxGrid and I'm tring add OnRxColumnFooterDraw Tnotify event

I sent out "Canvas" so programmer can change any info. background color, font etc. Sent Canvas to out, better then one by one (Bursh, Pen bla bla)
  I'm looking for short code for change original rxcodes. last chance sent to out Brush and font


16-04-2014 15:40 tarihinde, Mattias Gaertner yazdı:
>     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
> What parts do you want to restore?
> Brush, Pen, Font, Handle state, pixels?
>
> Mattias
>





More information about the Lazarus mailing list