|
Post by ptitjoz on Jan 19, 2021 11:39:40 GMT 1
Hello Is there a way on a canvas to know the state of a pixel? Example know if the pixel in position 25.34 and on or off? Thank you for your help Best regards
|
|
|
Post by Pjot on Jan 19, 2021 17:24:42 GMT 1
Hi ptitjoz,
You can use the (undocumented) HUG directive GETCOLOR$. It was added in HUG 0.99.
The prototype is as follows:
GETCOLOR$(NUMBER x, NUMBER y, NUMBER flag)
The <x,y> arguments define the position of the pixel. The <flag> indicates if you want to retrieve the alpha value as well (in case of OpenGL). If you do not use OpenGL then flag can be 0.
HTH Peter
|
|
|
Post by ptitjoz on Jan 19, 2021 22:15:43 GMT 1
Thanks Peter This is exactly what I was looking for in information! Thanks for your quick answer. Best regards
|
|