[Lazarus] Fast drawing to canvas

Darius Blaszyk dhkblaszyk at zeelandnet.nl
Wed Feb 8 14:17:49 CET 2012


I've did some tests with a tcustomcontrol, but that hardly gave me any speed benefit. Both methods are drawing at 11fps

Regards, Darius



On Feb 8, 2012, at 8:25 AM, Felipe Monteiro de Carvalho wrote:

> 2012/2/8  <dhkblaszyk at zeelandnet.nl>:
>> 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.
> 
> I don't recommend using TImage for fast changing graphics. The really
> fast and reliable way to draw motion graphics is to implement a
> TCustomControl descendent like explained in the wiki:
> 
> http://wiki.lazarus.freepascal.org/Developing_with_Graphics#Create_a_custom_control_which_draws_itself
> 
> -- 
> Felipe Monteiro de Carvalho
> 
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus





More information about the Lazarus mailing list