• 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: Rotate NSImage to get a new NSImage, without drawing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Rotate NSImage to get a new NSImage, without drawing


  • Subject: Re: Rotate NSImage to get a new NSImage, without drawing
  • From: douglas welton <email@hidden>
  • Date: Sun, 1 Mar 2009 19:42:12 -0500

Jerry,

I'll offer a couple of other alternatives:

1) Use Quartz Composer to do the transformation for you. You should be able to build a composition with just a few (2?) patches. You can even bind the parameters for the composition to controls on your UI using Interface builder.

2) Use Core Image. You can pass your original CIImage to the CIAffineTransform CIFIlter. The resulting (transformed) CIImage can be used to init an NSBitmapImageRep. From there you can get back the NSImage you are looking for.

later,

douglas

On Feb 28, 2009, at 10:31 PM, Jerry Krinock wrote:


I understand that NSAffineTransform can rotate an image while you're drawing it. But is there any way to rotate an image and get a new image? Something like:


NSImage* imageUp = [NSImage imageNamed:@"BaseImage"] ;
NSImage* imageLeft = [imageUp myRotateByDegrees:90] ;
...

How could I implement -[NSImage myRotateByDegrees] ?

(The reason is that I want images rotated in four directions to which I can bind the 'image' binding of buttons that open/close drawers on the bottom, top, left or right window edge.

Jerry Krinock

_______________________________________________

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


  • Prev by Date: Re: enabling Edit menu items in a modal window?
  • Next by Date: Re: Animate the way a HUD panel appears.
  • Previous by thread: Re: Rotate NSImage to get a new NSImage, without drawing
  • Next by thread: Re: Running Cocoa applications from file servers
  • Index(es):
    • Date
    • Thread