AffineTransform an NSWindow?
AffineTransform an NSWindow?
- Subject: AffineTransform an NSWindow?
- From: Finlay Dobbie <email@hidden>
- Date: Tue, 14 Aug 2001 22:51:53 +0100
Is this possible? It should be. There is a function in Carbon for doing
it (TransformWindow), but much poking around in both the public and
private AppKit APIs hasn't turned up much. At the moment, I'm trying
this:
NSAffineTransform *myTransform = [NSAffineTransform transform];
NSGraphicsContext *myContext = [NSGraphicsContext
graphicsContextWithWindow:[self window]];
[myTransform rotateByDegrees:90];
[NSGraphicsContext setCurrentContext:myContext];
[myContext saveGraphicsState];
[myTransform concat];
but that's probably stupid and idiotic. a while ago I also tried using
CoreGraphics calls on a CGContext of my window's NSCGSGraphicsContext,
but that just didn't work, eithre (looks like windows are treated
differently than other contexts by the windowserver?).
Anybody have any ideas?
Oh yes, and Is there any way of "attaching" a window to another window,
so they move together (like drawers and sheets do). Looks like sheets
use an NSMoveHelper or something, but I'm reluctant to use this because
it's an evil private API and probably won't work (or I won't be able to
figure out how to make it work). I'm sure this was asked recently, but I
just deleted my archive. Is the web archive searchable yet? I forget...
Hmm...
-- Finlay