Le 19/04/2012 19:01, trat50 a écrit :
>
> I would like some help the syntax of the Grab command.
> I want to save a DrawingArea as a png or jpg file.
> Would someone please post a short example. Thank you.

The Grab() method is reliable only when grabing the entire desktop. If 
you grab a control, X-Window may or may not return what you see on the 
screen. Normally, if the control window is not covered, you get it.

But...

1) If you use a composited desktop, I don't know what happens then.

2) Moreover, QT4 and GTK+ now do not use one window by control anymore, 
so they internally emulate the old behaivour. But I don't know how 
(maybe by maintaining a big image buffer for each top-level window, or 
by redrawing the control inside a picture).

So, personnally, I suggest never using the Grab() method on a control. I 
may remove it in the future.

-- 
Benoît Minisini

------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to