On 2009 Jul 26, at 01:00, Agha Khan wrote:
Now suppose I want to rotate that image at 90 degree. Is there an easy way to accomplish this task?
Easy, yes. (Just copy Steve Christensen's code ... it works) http://www.cocoabuilder.com/archive/message/cocoa/2009/3/1/231362 Here's the header file for that category: #import <Cocoa/Cocoa.h> @interface NSImage (Transform) /*! @brief Rotates an image around its center by a given angle in degrees and returns the new image. @details The width and height of the returned image are, respectively, the height and width of the receiver. I have not yet tested this with a non-square image. */ - (NSImage*)imageRotatedByDegrees:(CGFloat)degrees ; @end Two more solutions from Douglas Welton: http://www.cocoabuilder.com/archive/message/cocoa/2009/3/2/231366 _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com