[Gambas-user] Drawing Area Location in Screenshot Depends on Window Location on Desktop

Fabien Bodard gambas.fr at ...626...
Wed Feb 5 21:36:28 CET 2014


Le 5 févr. 2014 18:26, "Tobias Boege" <taboege at ...626...> a écrit :
>
> On Wed, 05 Feb 2014, Fabien Bodard wrote:
> > And hOmage=daChart.grab ?
>
> No, DrawingArea.Grab() is still Control.Grab() which, according to the
> documentation[0] does something very different since Gambas 3.
>
> Whenever I wanted to save something from a DrawingArea later, I wrote
> something like this routine:
>
> Public Sub PaintIt()
>   Paint.Line(...)
>   ' ...
> End
>
> which is agnostic about the Paint device. In the DrawingArea_Draw() event
> handler, I would call this procedure and when a picture with the contents
> is to be saved, I would create a Picture and start a Paint on it, then
call
> that routine above again.
>
> Depending on your application (when the paint to the picture may already
> produce something different from the DrawingArea contents), you may also
> always paint to a Picture in the DrawingArea_Draw() event handler and then
> draw the Picture onto the DrawingArea in a second step.
>
> Taking a screenshot to get the DrawingArea contents seems to be a very
ugly
> method to me.

I'm agree
>
> Regards,
> Tobi
>
> [0] http://gambasdoc.org/help/comp/gb.qt4/control/grab?v3
>
> --
> "There's an old saying: Don't change anything... ever!" -- Mr. Monk
>
>
------------------------------------------------------------------------------
> Managing the Performance of Cloud-Based Applications
> Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
> Read the Whitepaper.
>
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user



More information about the User mailing list