FROM : Dave Dribin
DATE : Thu Jan 02 15:14:02 2003
On Thursday, January 2, 2003, at 04:20 PM, Douglas Davidson wrote:
>
> On Thursday, January 2, 2003, at 02:06 PM, Dave Dribin wrote:
>
>> By Quartz drawing routines, do you mean CGContextShowTextAtPoint()
>> and friends? I have figured out how to get a CGContextRef, but how
>> do you translate other objects, like NSFont and NSGlyph for use in
>> Quartz?
>
> You should be able to use an NSGlyph and a CGGlyph interchangeably.
> You will want to set the font and color (using -[NSFont set] and
> -[NSColor set]) before drawing using e.g.
> CGContextShowGlyphsAtPoint(). Also, I believe CG's notion of "at
> point" differs somewhat from NSString/NSAttributedString
> drawAtPoint:'s.
Hmm... all I get are rectangles as if it does not know the correct
character. I even tried CGContextSelectFont(), but that didn't help
either.
-Dave
DATE : Thu Jan 02 15:14:02 2003
On Thursday, January 2, 2003, at 04:20 PM, Douglas Davidson wrote:
>
> On Thursday, January 2, 2003, at 02:06 PM, Dave Dribin wrote:
>
>> By Quartz drawing routines, do you mean CGContextShowTextAtPoint()
>> and friends? I have figured out how to get a CGContextRef, but how
>> do you translate other objects, like NSFont and NSGlyph for use in
>> Quartz?
>
> You should be able to use an NSGlyph and a CGGlyph interchangeably.
> You will want to set the font and color (using -[NSFont set] and
> -[NSColor set]) before drawing using e.g.
> CGContextShowGlyphsAtPoint(). Also, I believe CG's notion of "at
> point" differs somewhat from NSString/NSAttributedString
> drawAtPoint:'s.
Hmm... all I get are rectangles as if it does not know the correct
character. I even tried CGContextSelectFont(), but that didn't help
either.
-Dave






Cocoa mail archive

