I would like to clip an image with path. In the book Programming with Quartz there is an example on how to draw a circle clipped by a rectangular path (p.37), and there is also a chapter on image masking with existing image as stencil (Ch.10). But I'm still not sure about how to clip an existing image using path. Is there any example or pointer?
A:
krasnyk
2010-04-03 09:58:58
Thanks, it worked! :)
huggie
2010-04-11 07:30:39
Another question: How do I clip in a different region? I tried to use CGAffineTransform instead of the NULL there. But I end up having the image off-centered relative to the view.
huggie
2010-04-11 10:26:06
BTW, a look into documentation says drawInRect should scale the image as need fit. In my code it doesn't appear to scale (though this is what I want). But I want several UIView with different regions.
huggie
2010-04-11 10:51:41