• 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: "Frederick C. Lee" <email@hidden>
  • Date: Tue, 23 Jun 2009 11:59:13 -0700

This is for the iPhone/iTouch environment.

I discovered: CGContextTranslateCTM().

I'll also check out subclassing the scrollview.

Ric.

On Jun 14, 2009, at 7:53 PM, David Duncan wrote:

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


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

  • Prev by Date: Re: Problem: how to get glyph descent and ascent
  • Next by Date: Re: [Q] CFStringGetCStringPtr( ..., kCFStringEncodingUTF8)
  • Previous by thread: Re: Cocoa equivalent to Quartz's CGImageCreateWithImageInRect(image, imageRect);
  • Next by thread: NSRuntime.loadLibrary(/usr/lib/java/libObjCJava.dylib) error
  • Index(es):
    • Date
    • Thread