Re: [NSBezierPath appendBezierPathWithGlyph:inFont:] problem
Re: [NSBezierPath appendBezierPathWithGlyph:inFont:] problem
- Subject: Re: [NSBezierPath appendBezierPathWithGlyph:inFont:] problem
- From: Brock Brandenberg <email@hidden>
- Date: Thu, 25 Apr 2002 12:57:57 -0500
Hi Brad.
Thanks for the tips. After posting, I took a shot in the dark and
implemented the temporary NSImage trick like you suggest, and it worked
fine. My original solution was to lock focus on the NSView subclass, but
I need to pass thru the glyph outline gathering routine before the
view's window instantiation is finished, so it simply raised an
exception.
I found and browsed through the list archives at cocoa.mamasam.com which
are well indexed (with threading) and quite extensive, since they
archive the OmniGroup MACOSXDEV list as well as the cocoa-dev list. They
had the exact same temporary NSImage solution there, so we're not alone
with this problem. Check it out if you haven't seen it before.
Thanks,
Brock Brandenberg
I had a similar problem which I solved, but it was not as tough as
yours. My glyphs were merely appearing upside-down occasionally. Here
are some things which might help you:
1) If at all possible, create your path lazily at draw time. From the
formulation of your problem it sounds like this isn't an option, but if
you can make it be the case, it should work.
2) If you're drawing from within a subclass of NSView, just try locking
focus on self before the call.
3) If that doesn't work, you could instantiate an empty NSImage and lock
focus on that.
Don't know, hopefully something I suggested is helpful.
Good luck,
Brad Werth
----- industrial design @ bergdesign.com ------
_______________________________________________
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.