• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Cocoa equivalent to Quartz's CGImageCreateWithImageInRect(image, imageRect);
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa equivalent to Quartz's CGImageCreateWithImageInRect(image, imageRect);


  • Subject: Re: Cocoa equivalent to Quartz's CGImageCreateWithImageInRect(image, imageRect);
  • From: David Duncan <email@hidden>
  • Date: Sun, 14 Jun 2009 19:53:31 -0700

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 (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Cocoa equivalent to Quartz's CGImageCreateWithImageInRect(image, imageRect);
      • From: "Frederick C. Lee" <email@hidden>
References: 
 >Cocoa equivalent to Quartz's CGImageCreateWithImageInRect(image, imageRect); (From: "Frederick C. Lee" <email@hidden>)

  • Prev by Date: Re: NSRuntime.loadLibrary(/usr/lib/java/libObjCJava.dylib) error
  • Next by Date: Re: NSRuntime.loadLibrary(/usr/lib/java/libObjCJava.dylib) error
  • Previous by thread: Re: Cocoa equivalent to Quartz's CGImageCreateWithImageInRect(image, imageRect);
  • Next by thread: Re: Cocoa equivalent to Quartz's CGImageCreateWithImageInRect(image, imageRect);
  • Index(es):
    • Date
    • Thread