• 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: Rotating an image
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Rotating an image


  • Subject: Re: Rotating an image
  • From: Brad Werth <email@hidden>
  • Date: Mon, 20 Aug 2001 09:42:40 -0700
  • Organization: ORCAS, Inc.

>So, is there a built-in way of rotating an image, or at least
>displaying it rotated, without writing my own code for it or
>pre-making all of the rotated versions of the image?

I am encountering the exact same issue in my app's design. I have yet
to tackle it myself, so forgive me if this is a dead end, but here's my plan:

// from within your view's draw... method
[NSGraphicsContext saveGraphicsState];
[myRotationTransform set];

// draw your image here

[NSGraphicsContext restoreGraphicsState];

I'm not even certain that the save/restoreGraphicsState calls are
necessary if you're not drawing anything else in your view. I hope this
is helpful.

Brad Werth
email@hidden


  • Prev by Date: JPEG Image retrieval
  • Next by Date: Re: WTF? How can this work?
  • Previous by thread: Re: Rotating an image
  • Next by thread: CoreFoundation and Cocoa: mix, burn and RunLoop
  • Index(es):
    • Date
    • Thread