[Lazarus] Fast drawing to canvas

Bernd prof7bit at googlemail.com
Wed Feb 8 02:19:53 CET 2012


2012/2/8 Bernd <prof7bit at googlemail.com>:

> Image.BeginUpdate;
> Image.Picture.Bitmap.Clear;
> write the data directly to Image.Picture.Bitmap.RawImage.Data^
> Image.EndUpdate

Oh, I forgot: set the size, this is actually the whole point of the
clear Method: force it to create this raw image of the needed size if
it does not yet exist.

Image.BeginUpdate;
Image.Picture.Bitmap.Width := xxxx;
Image.Picture.Bitmap.Height := yyyy;
Image.Picture.Bitmap.Clear;
write the data directly to Image.Picture.Bitmap.RawImage.Data^
Image.EndUpdate




More information about the Lazarus mailing list