• 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
Re: NSBezierPath, flipped Glyphs, and NSOutlineView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSBezierPath, flipped Glyphs, and NSOutlineView


  • Subject: Re: NSBezierPath, flipped Glyphs, and NSOutlineView
  • From: Duncan Oliver <email@hidden>
  • Date: Wed, 12 May 2004 08:22:00 -0500

Thanks. I knew I had to take into account the different coordinate system, but I couldn't figure out how to flip it with NSAffineTransform. Thanks.

On May 12, 2004, at 7:37 AM, Scott Thompson wrote:

On May 12, 2004, at 5:48 AM, Duncan Oliver wrote:

I've been having a problem with the custom display for my subclass of NSCell. The subclass draws a box constructed with NSBezierPath and a glyph made with appendBezierPathWithGlyph:inFont. I have an NSOutlineView that displays this cell. The problem is that the glyph is upside-down, and I can't figure out how to flip it around. I've tried locking the focus to the control view of the cell (the NSOutlineView), but that doesn't help. Is there another fix for this problem? Thanks.

You need to flip the coordinate system for your view using something like:

NSAffineTransform *myTransform = [NSAffineTransform transform];

[transform translateXBy: 0 yBy: cellSize.height];
[transform scaleXBy: 1.0 scaleYBy: -1];

[NSGraphicsContext saveGraphicsState];
[transform concat];
... Draw Glyph here ...
[NSGraphicsContext restoreGraphicsState];
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


Duncan Oliver
email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >NSBezierPath, flipped Glyphs, and NSOutlineView (From: Duncan Oliver <email@hidden>)
 >Re: NSBezierPath, flipped Glyphs, and NSOutlineView (From: Scott Thompson <email@hidden>)

  • Prev by Date: Re: File's owner and delegate
  • Next by Date: Re: How to tell if first responder
  • Previous by thread: Re: NSBezierPath, flipped Glyphs, and NSOutlineView
  • Next by thread: How to share data between application and Printing Plug-In Module?
  • Index(es):
    • Date
    • Thread