• 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
AffineTransform an NSWindow?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: AffineTransform an NSWindow?
      • From: Brendan Younger <email@hidden>
  • Prev by Date: Re: classes chart
  • Next by Date: Re: CFRunLoopRunInMode Return Codes
  • Previous by thread: Re: References, etc. for learning Cocoa?
  • Next by thread: Re: AffineTransform an NSWindow?
  • Index(es):
    • Date
    • Thread