How to get a UIView color of a perticular pixel(x,y)? - Printable Version
+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Game Programming Fundamentals (/forum-7.html)
+--- Thread: How to get a UIView color of a perticular pixel(x,y)? (/thread-1688.html)
How to get a UIView color of a perticular pixel(x,y)? - ravi124 - Mar 3, 2009 06:56 AM
I am new bie to iphone sdk. How can I get a UIView's color at a specific point(x,y).
Here is the situation:
I draw a few circles (with border color white and background is black), and there is another view(a small rectangle) which has to movie within the circles.
So, when I know the border color of the circle, I will make the small rectangle object to move back.
I have searched all the way, but no luck so far
(I am using core graphics/Quartz)
How to get a UIView color of a perticular pixel(x,y)? - Holmes - Mar 24, 2009 08:51 PM
There may be a better way, but you could try drawing into an CGBitmapContext, and then you can get direct access to the pixels.