• 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: problems with glyph y-axis flipping in an NSBezierPath
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problems with glyph y-axis flipping in an NSBezierPath


  • Subject: Re: problems with glyph y-axis flipping in an NSBezierPath
  • From: Brad Werth <email@hidden>
  • Date: Wed, 08 Aug 2001 16:07:55 -0700
  • Organization: ORCAS, Inc.

> I am trying to create an NSBezierPath containing some line art and some
> text that can be drawn as needed when my subclass of NSCell is resized.
> My NSCell subclass has two NSBezierPath instance variables -- one which
> is filled and one which is stroked. The text glyphs are being added to
> the NSBezierPath that gets filled. When drawing, the lines, rects,
> ovals etc. are consitently correct, but the text is not: sometimes the
> y-axis of the font is flipped such that a glpyh draws upside-down, but
> at the same baseline. As if a mirror was placed under the letter.

Responding to my own thread here for the sake of the someday-searchable
archives... Had an epiphany at 12:30am last night, in the shower, no
less. The call to NSBezierPath appendBezierPathWithGlyphs:count:inFont:
is obviously checking SOMETHING to determine whether or not the y-axis
is flipped, but what? There is no supplied NSView in the parameters, so
I guessed that it was using the currently focused NSView, and it was.
At the appropriate point in my code I put in a [whateverView lockFocus]
and everything looks great.

So now my question is this: is this a bug? I understand the need to
lockFocus during drawing, but I didn't expect the same need to occur
when populating an NSBezierPath -- I understand why now but it seems
really inconsistent and totally undocumented. Is it the presumption
that NSBezierPaths will only be modified during drawing?

Guess if I can figure out how, I'll file a bug on it.

Thanks,
Brad Werth
email@hidden


  • Follow-Ups:
    • Re: problems with glyph y-axis flipping in an NSBezierPath
      • From: "John C. Randolph" <email@hidden>
  • Prev by Date: Error using AppleScript
  • Next by Date: sending print: to window
  • Previous by thread: problems with glyph y-axis flipping in an NSBezierPath
  • Next by thread: Re: problems with glyph y-axis flipping in an NSBezierPath
  • Index(es):
    • Date
    • Thread