[Lazarus] Fast drawing to canvas

Darius Blaszyk dhkblaszyk at zeelandnet.nl
Wed Feb 8 14:20:51 CET 2012


Because otherwise the screen just does not update.

Darius

On Feb 8, 2012, at 11:39 AM, Sven Barth wrote:

> Am 08.02.2012 01:07, schrieb dhkblaszyk at zeelandnet.nl:
>> Hi,
>> 
>> I'm drawing a bitmap to the canvas by using LoadFromRawImage in
>> combination with a TImage. The OnPaint code below works just fine. When
>> I move the scrollbar, the images are drawn to the canvas, however there
>> is still a bit of flicker.
>> 
>> procedure TForm1.Image1Paint(Sender: TObject);
>> begin
>> Image1.Picture.Bitmap.LoadFromRawImage(bitmaplist[ScrollBar1.Position].RawImage,
>> False);
>> 
>> 
>> Application.ProcessMessages;
>> end;
>> 
> 
> Why are you calling "Application.ProcessMessages" here?
> 
> Regards,
> Sven
> 
> 
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus





More information about the Lazarus mailing list