Adam, > You need to have a current NSGraphicsContext for NSColor (and possibly other) > attributes. This is pretty easy, as in the following snippet from my own > code: > > [NSGraphicsContext saveGraphicsState]; > [NSGraphicsContext setCurrentContext:[NSGraphicsContext > graphicsContextWithGraphicsPort:ctxt flipped:NO]]; > > CTFrameDraw(frame, ctxt); > CGContextFlush(ctxt); > CFRelease(frame); > > [NSGraphicsContext restoreGraphicsState];
Nice, I must admit I hadn't think about NSGraphicsContext at all, having a valid CGContext. I'll try this. Thanks at lot! Vincent_______________________________________________ Cocoa-dev mailing list ([email protected]) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
