On Jun 12, 2009, at 11:53 AM, Frederick C. Lee wrote:

Is there a Cocoa/iPhone equivalent to Quartz's CGImageCreateWithImageInRect(image, imageRect)?


The equivalent is... CGImageCreateWithImageInRect :). Keep in mind that 9 times out of 10 what people want to use it for is not what that API is really designed for. If you just want to draw part of an image, use clipping & translation (either translate the CTM, or move your drawing rect).

If you want to pan across an image (and it isn't too big) you can just put the whole thing in a UIImageView contained in a UIScrollView. If the image is fairly large, then you may want to use a CATiledLayer (but you will have to draw it via Quartz instead of via UIImage's draw methods).
--
David Duncan
Apple DTS Animation and Printing

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to