[Gambas-user] Re; Image handling ...
Benoit Minisini
gambas at ...1...
Fri Jul 27 00:55:12 CEST 2007
On vendredi 27 juillet 2007, Gareth Bult wrote:
> Urm,
>
> I was using a picture box and you said;
>
> > But the ideal is using a DrawingArea with Cached = FALSE, and drawing the
> > picture in the Draw event. Or with Cached = TRUE if your picture is not
> > too big.
>
> Well, the picture is ~ 12k bytes at 320x240 or about 55k at 640x480 ...
> So I opted for Cached = FALSE ..
>
> I just tried;
>
> draw.Begin($canvas)
> draw.Picture($picture, 0, 0, 320, 240)
> draw.End
>
> in place of $canvas.Refresh with Cached = TRUE .. got a blank page ...
>
> Not sure how cached = True works .. will investigate if you think it will
> help ..
>
> Gareth.
>
When a DrawingArea is cached, all Draw commands are redirected to a pixmap
cache. This pixmap cache becomes the "background pixmap" of the DrawingArea
window. In other words, when the DrawingArea needs to be redrawn, the X
server does it directly without any dialog with the X client (your
application). So it avoids flickering.
Send me your project, maybe I can tell you more.
Regards,
--
Benoit Minisini
More information about the User
mailing list