• 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: Scott Thompson <email@hidden>
  • Date: Wed, 12 May 2004 07:37:27 -0500

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.


  • Follow-Ups:
    • Re: NSBezierPath, flipped Glyphs, and NSOutlineView
      • From: Duncan Oliver <email@hidden>
References: 
 >NSBezierPath, flipped Glyphs, and NSOutlineView (From: Duncan Oliver <email@hidden>)

  • Prev by Date: File's owner and delegate
  • Next by Date: Re: CamelBones question
  • Previous by thread: NSBezierPath, flipped Glyphs, and NSOutlineView
  • Next by thread: Re: NSBezierPath, flipped Glyphs, and NSOutlineView
  • Index(es):
    • Date
    • Thread