Re: drawAtPoint rendering thin, light text?
Re: drawAtPoint rendering thin, light text?
- Subject: Re: drawAtPoint rendering thin, light text?
- From: John Randolph <email@hidden>
- Date: Thu, 30 Oct 2003 14:23:50 -0800
On Oct 30, 2003, at 12:23 PM, Evan Olcott wrote:
on 10/30/03 12:14 PM, Jvrn Salewski at email@hidden wrote:
I could imagine that it has nothing to do with the attributes, but
rather
with the location where you' re drawing.
Maybe your x and y coordinates of your NSPoint are uneven numbers. In
this
case the drawing could fall in between the actual screen pixels and
causing
unwanted 'antialiasing.' If so, you could try to round the NSPoint
coordinates to the nearest decimal.
Just a thought.
Cheers,
JS
I've tried all sorts of combinations of x + 0.5 and x + 0.25 and
round(x),
all to similar result. Not exactly the same, but still pretty bad
comparatively.
Further research has shown: just draing it inside an allocated NSImage
then
drawing the result back is making the problem text. If I [NSString
drawAtpoint] right in the view itself, the text looks beautiful.
NOW - what would an NSImage be doing to my text?
Evan,
I think that what's tripping you up here is that when you draw the text
into the image, the Quartz 2D framework can't do sub-pixel antialiasing
(which is device-dependent by definition.)
While it's good to try to optimize your drawing, I think that in this
case the cost of drawing five characters is negligible.
-jcr
John C. Randolph <email@hidden> (408) 974-8819
Sr. Cocoa Software Engineer,
Apple Worldwide Developer Relations
http://developer.apple.com/cocoa/index.html
_______________________________________________
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.