Rotating NSImage in NSImageView
Rotating NSImage in NSImageView
- Subject: Rotating NSImage in NSImageView
- From: Mario Diana <email@hidden>
- Date: Fri, 23 Nov 2001 19:47:08 -0500
Is there a simple way of rotating an image? Let me explain.
I'm handling my image the easy way. I create an NSData from a
java.io.File, convert that to an NSImage, finally setting the NSImage in
an NSImageView. That takes just a few lines of code (which makes me very
happy).
Now, I'd like to able to push a button and rotate the image 90 degrees.
Is there a simple method to rotate an image, and if so, in which class
will I find it? If there isn't a simple way of doing this, would I have
to throw out the code I've described above and do the whole thing in
some very involved way?
My skills are limited ;-)
If this is going to involve some he-man programming skills, could
somebody please give me a hint as to what part of the documentation I
should read, and to which part of that I should give special attention?
(I saw a one line answer to a similar question on the archives, and it
was as good as Greek to me.)
Thanks!