Rotating NSImage?
Rotating NSImage?
- Subject: Rotating NSImage?
- From: Clyde McQueen <email@hidden>
- Date: Thu, 7 Jun 2001 11:37:55 -0700
Should I expect NSImage objects to rotate when I rotate the enclosing
view? I've tried two ways:
1. An NSImageView set up in IB.
2. A custom view with:
- (void)drawRect:(NSRect)aRect
{
NSRect bounds = [self bounds];
NSImage *image = [[[NSImage alloc]
initByReferencingFile:PICTURE_PATH] autorelease];
NSPoint p;
p.x = bounds.origin.x + bounds.size.width / 2;
p.y = bounds.origin.y + bounds.size.height / 2;
[image compositeToPoint:p operation:NSCompositeCopy];
// ... and some NSBezierPaths so I can see the rotation...
}
In all cases the images show up just fine, but they appear to ignore the
rotation. What did I forget to do, or is this a limitation of NSImage?
/Clyde