[Gambas-user] Find color on point in drawingarea

ron ronstk at ...239...
Tue May 23 04:42:44 CEST 2006


On Monday 22 May 2006 07:21, Timothy Marshal-Nichols wrote:
>   DIM c AS Integer
>   c = DrawingAreaColor.Grab().Image[Mouse.X, Mouse.Y]
>   PRINT "Color: 0x" & Hex(c, 6) & " at " & Mouse.X & ", " & Mouse.Y
> 

Thanks voor the code, it works but I have chosen an other way now.
I draw the lines in a batch with the normal draw method.
For the mouse down I draw the lines dot by dot, in fact calculate
only the poinst, and check for a collision with the mouse x/y position.
This way I'm able to have a hit if the mouse x/y point is fictive 
upsized to not 1 but 3 pixels width/height.

Following the constuction of your code with usage of .Grab in the 
help was interesting. The code is stored in project anyway. :)

Thanks anyway,

Ron




More information about the User mailing list