[Lazarus] Recent Graphics changes...

Marc Weustink marc at dommelstein.net
Sun Aug 10 17:50:00 CEST 2008


wile64 wrote:

> I changed strategy and I don't load whole picture, I charge what is seen 
> and with DoubleBuffered is great ;)
> 
> I have found a solution for the handles probleme, like this :
>   PreviewImage:= TLazIntfImage.Create(0, 0);
>   PreviewImage.DataDescription:=GetDescriptionFromDevice(0, 0, 0);
>   PreviewImage.SetSize(PreviewWidth*32, PreviewHeight*32);
> 
> This dont work:
>  PreviewImage:= TLazIntfImage.Create(PreviewWidth*32, PreviewHeight*32);

Yes, this way you don't have a device description.

> I do not know if is good, but it works :-)

you can combine
    PreviewImage.DataDescription:=GetDescriptionFromDevice(0, 0, 0);
    PreviewImage.SetSize(PreviewWidth*32, PreviewHeight*32);
to
    PreviewImage.DataDescription:=GetDescriptionFromDevice(
      0, PreviewWidth*32, PreviewHeight*32);

btw, why the *32 ?

Marc



More information about the Lazarus mailing list