[Gambas-user] check pixel in drawingarea

Benoît Minisini gambas at ...1...
Tue May 10 14:14:11 CEST 2011


> Question on Gambas 3
> 
> I need to find pixelcolor from a drawingarea painted with the draw event.
> I tried already several variants of drawingarea.grab but always fail.
> 
> the help for Grab is weak and typeof(drawingarea.grab) gives 13 (function)
> 
> goal is to select pixel (drawn object as lines is not possible i gues) when
> on mouse.move over drawingarea.
> 
> wally
> 

You can't, because the DrawingArea contents is stored inside the X server (or 
the graphic card). This is a X11 thing.

You have to use an intermediate Image object in memory.

Regards,

-- 
Benoît Minisini




More information about the User mailing list