I'm making a rgb color eyedropper tool.
The workflow is as follows:
- Have a picture in the form of a sprite.
- Set DrawingCanvas size and position to that of the sprite.
- Paste picture into the DrawingCanvas.
- Save snapshot of the DrawingCanvas.
- When ready, on mouse click I do "snapshotRedAt(mouse.x,mouse.y)
That returns nothing when I click on the canvas, yet gives some readings when clicking outside the canvas which probably means that the coordinates for snapshotRedAt need to be relative?
How do I then provide mouse coordinates for snapshotRedAt correctly in order to read pixel at that precise spot (independently of where the canvas is located in the layout?)
thanks!