How to get a UIView color of a perticular pixel(x,y)?
Hi,
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)
Thank you,
Sridhar
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)
Thank you,
Sridhar
ravi124 Wrote:Hi,
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)
Thank you,
Sridhar
There may be a better way, but you could try drawing into an CGBitmapContext, and then you can get direct access to the pixels.
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| How do I apply a perspective transform to a UIView and add to cocos2d | sefiroths | 0 | 1,895 |
Sep 24, 2012 05:45 AM Last Post: sefiroths |
|

