Thanks everyone! I've learned a lot. I also found working in a flipped view
easier for just getting a grasp of things like the NSRect returned by
-usedRectForTextContainer:.
Just for fun, I played with an NSView that is flipped, *except* just before the
call to -drawGlyphsForGlyphRange:atPoint
Probably my choice of word, "compensate", caused a little misunderstanding. 8-)
The Text System does generally assume the coordinate to be flipped.
Since the font rendering follows the graphics state, you get the text rendered
up side down if you don't apply the inverted text matrix in the flippe
On Tue, Feb 1, 2011 at 2:14 PM, David F. wrote:
> Aki, is it really a good idea for the text system to automatically apply an
> inverted text matrix? The text is *not* rendered correctly just by applying
> an inverted text matrix to the font: for example, underlines and
> strikethroughs aren'
On Tue, Feb 1, 2011 at 2:23 PM, Graham Cox wrote:
> Personally I'd prefer if all contexts/views were flipped by default, as that
> seems more natural as a programmer, but that's another argument (and another
> one that's never going to change).
You already have your wish on iOS. :)
--Kyle Slud
On 02/02/2011, at 9:14 AM, David F. wrote:
> To me, this seems like a mis-feature.
There are plenty of situations where you want a bit of text drawn in a
non-flipped context - button titles, for example. You don't need a complex
layout but the actual glyphs still need to come out right. If th
On Feb 1, 2011, at 1:38 PM, Aki Inoue wrote:
> What the Text System does is to apply an inverted text matrix to compensate
> the flipped CTM automatically (inside -[NSFont setInContext:]) so that the
> text is rendered correctly regardless of the rendering context flippedness.
Aki, is it reall
With a flipped environment, the CTM presumably describes a coordinate system
starting from the top left corner.
So, you're right that all graphics operations including the glyph rendering
show up side down.
What the Text System does is to apply an inverted text matrix to compensate the
flipped
On Jan 31, 2011, at 9:04 PM, Todd Heberlein wrote:
> For now, if I want my string drawn on a base line beginning at the point
> basePoint, I currently define a glyphPoint which subtracts the font's
> pointSize from the basePoint's Y value. So far it seems to work on a variety
> of font sizes. A
On Jan 31, 2011, at 10:53 PM, David F. wrote:
> So why aren't glyphs drawn upside-down when the context hasn't been flipped?!
Why do you think they should be upside down? Flippedness is implicated in
determining the origin point of the text container. Text containers themselves
are always right
On 01/02/2011, at 1:04 PM, Todd Heberlein wrote:
> For now, if I want my string drawn on a base line beginning at the point
> basePoint, I currently define a glyphPoint which subtracts the font's
> pointSize from the basePoint's Y value. So far it seems to work on a variety
> of font sizes. Ar
Douglas -- Something somewhere must be trying to compensate for the unflipped
context, because the text isn't drawn upside-down. Yes, the positioning is
calculated with the assumption that the context is flipped, and effects like
strikethrough and underline are drawn with the assumption that th
On Jan 31, 2011, at 3:23 PM, Aki Inoue wrote:
> The precise definition of the point specified by the argument is the top left
> corner of the text container containing the glyph range in the focused view
> coordinate system.
This flipped view for fonts confuses me a bit because the fonts are or
The precise definition of the point specified by the argument is the top left
corner of the text container containing the glyph range in the focused view
coordinate system.
Aki
On Jan 31, 2011, at 3:18 PM, Graham Cox wrote:
>
> On 01/02/2011, at 9:09 AM, Todd Heberlein wrote:
>
>> I'm doing
On 01/02/2011, at 9:09 AM, Todd Heberlein wrote:
> I'm doing a simple experiment using NSTextStorage, NSLayoutManager,
> NSTextContainer to draw some text (I am basing this on the CircleView example
> because I want some of that orientation power later).
>
> I have found that when rendering th
The layout manager expects to be drawing within a flipped context.
Douglas Davidson
On Jan 31, 2011, at 2:09 PM, Todd Heberlein wrote:
> I'm doing a simple experiment using NSTextStorage, NSLayoutManager,
> NSTextContainer to draw some text (I am basing this on the CircleView example
> because
15 matches
Mail list logo