ok I have the color of a pixel but I wont to find x,y of that pixl with out moving the mouse over it. so far im thinking i need to use this.
but I dont know what els to do.Code:COLORREF RGB(37, 124, 244);
This is a discussion on find x,y from pixel within the C++ Programming forums, part of the General Programming Boards category; ok I have the color of a pixel but I wont to find x,y of that pixl with out moving ...
ok I have the color of a pixel but I wont to find x,y of that pixl with out moving the mouse over it. so far im thinking i need to use this.
but I dont know what els to do.Code:COLORREF RGB(37, 124, 244);
I don't quite understand what you are asking, but what I think you are asking is this:
"How can I find the RGB color value of a specific pixel on the screen at some coordinate (x,y)?"
Is that correct? Or are you asking this question:
"How can I find all pixels with coordinates (x,y) that have the specified RGB value which I know?"
Whatever the case...I don't think COLORREF is what you want. It just stores some RGB value in memory as a "color". It has nothing to do with (x,y) coordinates.
>> but I dont know what els to do.
a book perhaps?
Code:int main(void){srand(time(0));for(double l=rand(),l0=0,l00=0;;l0+=0.1){for(double l000=0;l000 <1;l000+=.001,l+=((double)rand()/RAND_MAX)/0x64,l00+=((sin(l*0x8*atan(l0)*l000-(l0*0x8*atan (l)))*0.5)+0.5)){l00-=floor(l00);for(size_t l0000=0,l00000=(size_t)(0x50*(l00));l0000<l00000;++l0000 )putchar(0x20);putchar(0x61+(int)((double)rand()/RAND_MAX*0x1a));putchar('\n');}}return 0;}
no thats not it but I think that i have figured it out thanks
If you are trying to get pixel x,y from pixel offset:
Code:int pixel_x = offset % (width); int pixel_y = offset / (width);