On Jan 25, 2009, at 11:06 AM, Ashley Perrien wrote:
Is there a way to get the color of a pixel or area of an NSView
during the drawRect method?
Sure. Have a look at this:
http://developer.apple.com/samplecode/Color_Sampler/index.html
NSReadPixel() will tell you the color of the pixel nearest to the
given location, in the current drawing context.
-jcr
"This is not a book to be tossed aside lightly. Rather, it should be
hurled with great force." -Dorothy Parker
_______________________________________________
Cocoa-dev mailing list ([email protected])
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]