Re: Unwanted clip of rotated text
Re: Unwanted clip of rotated text
- Subject: Re: Unwanted clip of rotated text
- From: Erez Anzel <email@hidden>
- Date: Tue, 24 Feb 2004 17:17:06 -0500
Thanks, Douglas. Two answers.
As you suggested, I now call drawGlyphsForGlyphRange for the entire
glyphRange in one call, rather than drawing the characters/glyphs one
at a time. Obvious improvement, since I'm drawing text along a straight
line.
I appreciate the need to avoid breaking anyone's app. Perhaps you could
provide some additional method(s) which would allow for a workaround.
For instance, my text didn't appear because it was clipped. Maybe
there's a way to save the current clipRect, set a different clipRect
which would allow my drawing to appear, then restore the original
clipRect. I saw a part of this somewhere, but it was available only for
Panther. I remember back in the old days we had GetClip and SetClip,
which apparently are still around, but I wouldn't want to use them on
NSView views without "approval" (or guidance) from Apple.
Bye...Erez
On 24-Feb-04, at 12:38 PM, Douglas Davidson wrote:
>
On Feb 23, 2004, at 7:03 PM, Erez Anzel wrote:
>
>
> Thanks, Allan, for hinting that I should stop banging my head against
>
> the wall. If you had problems with undesired clipping as well, then I
>
> should look elsewhere. You pointed me towards ATSU, which smelled of
>
> Carbon. So instead I looked to the CircleView example from Apple
>
> (AppKit), and "simplified" it. It sure is "expensive" code just to
>
> rotate text 90 degrees; maybe one day Cocoa will have something
>
> simpler, waiting for the taking.
>
>
You're on the right track here, but you could save a lot of the work
>
and code by not drawing each glyph individually. The CircleView
>
example needs a different transform for each glyph, but you don't--you
>
can just perform one overall transform, then ask for all of the glyphs
>
to be drawn at once.
>
>
We know about clipping problems under some circumstances with the
>
stock string drawing code, but unfortunately it's very difficult to
>
make changes in this area due to backward compatibility issues. We
>
are working on potential solutions for this.
>
>
Douglas Davidson
>
_______________________________________________
>
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.
_______________________________________________
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.