Re: [Lazarus] TForm.GetFormImage is broken?

2016-12-27 Thread Michael W. Vogel via Lazarus
The method TWinControl.PaintTo doesn't refresh the RawImage.Data, like it is done in TRasterImage.Draw. It isn't only a issue for the method GetFormImage. I fixed it in revision 53790. As far as I can see, there are no additional calls done, as the needed one (e.g. TWin32WidgetSet.RawImage_From

Re: [Lazarus] TForm.GetFormImage is broken?

2016-12-27 Thread Giuliano Colla via Lazarus
Il 27/12/2016 17:49, Juha Manninen via Lazarus ha scritto: Somebody with good knowledge of the graphics code should fix it. I remember I tried over 2 years ago but failed. Just adding a line to GetFormImage does the trick: function TForm1.GetFormImage: TBitmap; var ARect: TRect; begin R

Re: [Lazarus] TForm.GetFormImage is broken?

2016-12-27 Thread Juha Manninen via Lazarus
Somebody with good knowledge of the graphics code should fix it. I remember I tried over 2 years ago but failed. Juha -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus

Re: [Lazarus] TForm.GetFormImage is broken?

2016-12-27 Thread Michael W. Vogel via Lazarus
Am 27.12.2016 um 11:17 schrieb Balázs Székely via Lazarus: But Delphi does not require the bmp.Canvas.Changed. Shouldn't it be added to the GetFormImage internally to make this simple code Delphi-compatible? That's a good idea. The current behavior is confusing. See comments: http

Re: [Lazarus] TForm.GetFormImage is broken?

2016-12-27 Thread Balázs Székely via Lazarus
> > But Delphi does not require the bmp.Canvas.Changed. Shouldn't it be added > to the GetFormImage internally to make this simple code Delphi-compatible? That's a good idea. The current behavior is confusing. On Tue, Dec 27, 2016 at 1:40 AM, Werner Pamler via Lazarus < lazarus@lists.lazarus-ide.

Re: [Lazarus] TForm.GetFormImage is broken?

2016-12-26 Thread Werner Pamler via Lazarus
Please try this: var bmp: TBitmap; begin bmp:=Form1.GetFormImage; try *bmp.Canvas.Changed;* bmp.SaveToFile(ExtractFilePath(Application.ExeName)+'form.bmp'); finally FreeAndNil(bmp); end; end; But Delphi does not require the bmp.Canvas.Changed. Shouldn't it be added to the GetFormI

Re: [Lazarus] TForm.GetFormImage is broken?

2016-12-26 Thread Fabio Luis Girardi via Lazarus
It worked. Thanks! Why is necessary to call the TCanvas.Changed after TForm1.GetFormImage? 2016-12-26 17:58 GMT-02:00 Balázs Székely : > Hi, > > Am I using the method GetFormImage right? >> > Yes, > > > Should I fill a bug report for this issue? >> > No. > > Please try this: > var > bmp: TBitm

Re: [Lazarus] TForm.GetFormImage is broken?

2016-12-26 Thread Balázs Székely via Lazarus
Hi, Am I using the method GetFormImage right? > Yes, Should I fill a bug report for this issue? > No. Please try this: var bmp: TBitmap; begin bmp:=Form1.GetFormImage; try *bmp.Canvas.Changed;* bmp.SaveToFile(ExtractFilePath(Application.ExeName)+'form.bmp'); finally FreeAndN

[Lazarus] TForm.GetFormImage is broken?

2016-12-26 Thread Fabio Luis Girardi via Lazarus
Hi! Currently I'm trying to use TForm.GetFormImage method to make a minimap (something similar to Sublime Text editor) of a big form (the parent of this big form is a TScrollbox on this application). But, using Qt or GTK2, Lazarus 1.6.3 or trunk, I got the same black bitmap. So, I created a empt