Re: How to draw correct underline ?
Re: How to draw correct underline ?
- Subject: Re: How to draw correct underline ?
- From: Keith Blount <email@hidden>
- Date: Thu, 25 Aug 2005 15:41:31 -0700 (PDT)
Usually, when a line is drawn across two pixels when
you expect it to be drawn across only one, it is
because of where you have placed it. If you want to
draw a one pixel line, it has to be placed at the
centre of a pixel. So, for instance, if you were to
draw a line at the Y position 10.0, it would be
blurred, but if you drew it at Y position 10.5, it
would be drawn "correctly".
Thus, in your original post, where you had this:
[[self title] drawInRect:textRect
withAttributes:stringAttributes];
Try:
textRect.origin.y = roundf(textRect.origin.y)+0.5;
[[self title] drawInRect:textRect
withAttributes:stringAttributes];
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden