Re: Font Color In CTLineDraw?
Re: Font Color In CTLineDraw?
- Subject: Re: Font Color In CTLineDraw?
- From: Jean-Daniel Dupas <email@hidden>
- Date: Wed, 3 Sep 2008 18:04:03 +0200
Le 3 sept. 08 à 17:17, Mike Rossetti a écrit :
Thanks for clearing that up David.
Apparently one cannot open an NSGraphicsContext within a CGContext,
but I will experiment more this evening.
I'm discovering that drawing attributed text via CTLineDraw has
significant limitation, but for my purposes I believe I can live
within those limitations.
It would be, ahem, illustrative if there was an example or two of
drawing simple NSAttributedString-based unicode text using CG in a
CALayer within an NSView.
Thanks again,
Mike
Create an NSGraphicsContext from you CGContext:
+ [NSGraphicsContext graphicsContextWithGraphicsPort:flipped:];
Set it as the current context
+ [NSGraphicsContext setCurrentContext:];
And now you should be able to draw string into your CGContext.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden