PDA

View Full Version : determine color of pixel




swyitch
Dec 29, 2008, 04:25 PM
if im drawing a line on top of a UIImage with something like the following

CGContextMoveToPoint(context, x1, y1);
CGContextAddLineToPoint(context, x2, y2);
CGContextStrokePath(context);

is there an easy way to determine what color the pixel is?

for example if my image is a solid blue box and draw the line into the box can i tell that the pixels are blue? (in quartz obviously)

thanks

jeff