Re: How to draw correct underline ?
Re: How to draw correct underline ?
- Subject: Re: How to draw correct underline ?
- From: Eric Morand <email@hidden>
- Date: Fri, 26 Aug 2005 01:04:40 +0200
I had already tried this and it didn't work.
That seems logical to me since I'm not drawing a line - the text
system is ! And I suppose it does what is needed to draw in the
center of the pixels.
But thanks for your help. I sure hop someone will find what the
problem is because I'm on it since this morning (it's the middle on
the night here in France) and I've used all my ideas to solve this
problem.
Eric.
Le 26 août 05 à 00:41, Keith Blount a écrit :
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