1 pixel width NSBezierPath issue
1 pixel width NSBezierPath issue
- Subject: 1 pixel width NSBezierPath issue
- From: Sebastian Gomez Papiol <email@hidden>
- Date: Tue, 18 Feb 2003 19:06:39 +0100
I want draw 1 pixel width lines without antialias using NSBezierPath.
I know how turning antialias off, the problem is when antialias is off
is impossible to draw a inclined or curved line 1 pixel width. I also
know I need center que coordinates to the center of the pixel using
(0.5, 0.5) points. For example the line origin(1.5, 1,5), end(120.5,
50.5) is drawn with a width of two pixels. Also I tried to set the line
width to values like 0.1, 0.001, 0, etc...
The problem is that quartz draw in every pixel the virtual line touch,
and this is correct, but NSBezierPath may have a trick to force the
paint of lines to the minium width the draw dispositive is able to
draw. For example, the documentation of NSBezierPath say the width 0
value force the line width to the minium value the draw dispositive is
able to draw, and perhaps NSBezier have a bug, since this value must be
1 pixel in every case, not two. (when I say every case, I say not only
horizontal or vertical lines) And with or without antialias. Of course
a 0 width value must force the printer also to draw lines of 1 printer
dot width.
I think that NSBezierPath have a serious bug, since I have to rewrite a
custom NSBezierPath to do what I want to do. I want make a question: a
powerful class is a class that can do a lot of things, not only
extraordinary things like paint precise curved lines with an excellent
antialias algorithm but all the drawing possible. And NSBezierPath
don't allow 1 pixel paths without antialias, for this reason I can't
use it. The question is: is NSBezierPath a powerful class? the answer:
No since Apple solve this issue. I'm a little indignant since I listen
NSBezierPath draw 1 pixel lines well in OpenStep and also in the first
release of Mac OS X Server...
I read a lot of people trying to make 1 pixel lines, because this type
of lines are absolutely necessary in some types of programs, but nobody
have the answer, and seems that nobody consider this a real bug, but I
consider it a tremendous bug.
_______________________________________________
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.