Get the Color of a point on the screen
BlitzMax Forums/BlitzMax Beginners Area/Get the Color of a point on the screen
| ||
I am sure this should be easy, but how do I find the colour of a point on the screen? For example if the user clicks the mouse somewhere on the screen I want to know the colour of the pixel at that point. I guess I could grab an image of the screen, lock the image and read the appropriate pixel using ReadPixel(), but this just seems long winded. I thought there might be a function that just took x and y as parameters and returned the rgb value, but I can't seem to find anything. |
| ||
You can grab a pixmap and read the data from that (instead of going to image and lock it to make it a pixmap). |
| ||
You shouldn't have to grab the whole screen just a single pixel which should make it so quick you won't notice. |
| ||
okay i'll do that - thanks guys |