Re: Line width in an NSBezierPath
Re: Line width in an NSBezierPath
- Subject: Re: Line width in an NSBezierPath
- From: email@hidden
- Date: Mon, 13 May 2002 03:45:49 -0600
Also the problem is that when you call stroke, for example, it does this:
- (void)stroke
{
...
if(_lineWidth==0.0)
drawLineWidth=1.0;
else
drawLineWidth=abs(_lineWidth);
...
}
The logic being if you really meant to draw the path then you probably
did not want 0.0 as your line width. Here is the thread
http://cocoa.mamasam.com/MACOSXDEV/2002/04/1/30682.php
On Monday, May 13, 2002, at 03:00 AM, Nathan Day wrote:
This question again, add 0.5 to line position. Search mail archives for
explanation why.
On Monday, May 13, 2002, at 04:49 PM, Nicola Vitacolonna wrote:
Hi all,
a very simple question (I hope), for which I cannot find an answer.
I have a NSView in which I draw some horizontal black lines on a white
background. I have set the line width with setLineWidth:0.0 to be the
minimum allowed, but still these lines appear as they were
"anti-aliased" or something like that, so they appear thicker than one
pixel and, what's worse, their width differ from each other and changes
when I resize the NSView. This is not what I want.
How can I get a straight line whose (fixed) width is one pixel? A code
snippet follows.
_______________________________________________
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.