Re: Rotating an image
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