Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

MacRumoron

macrumors 6502
Original poster
Sep 6, 2005
324
0
Hi, i was just wondering if it were possible to know what color pixel the cursor is hovering over??

Anyone know the code to do this?

Thanks :D
 

savar

macrumors 68000
Jun 6, 2003
1,950
0
District of Columbia
MacRumoron said:
Hi, i was just wondering if it were possible to know what color pixel the cursor is hovering over??

Anyone know the code to do this?

Thanks :D

Eek, I don't think this can be done in Cocoa. You can use Cocoa to get the cursor coordinates, though. Look into NSWorkspace i think. As far as pixel color, assuming you want to grab a pixel from *any* application and not just your own, you're going to have to grab the backing store from the window server. Try looking on dev.apple.com for the window server and aqua documentation, also try posting this question to the newsgroup comp.sys.mac.programmer.help.

Good luck
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.