How to draw a single pixel line?
How to draw a single pixel line?
- Subject: How to draw a single pixel line?
- From: Stefan Leuker <email@hidden>
- Date: Sun, 10 Mar 2002 10:48:49 +0100
Hello all,
thanks to the power of Quartz, it seems to be difficult to draw a single
pixel horizontal line.
Here's what I tried:
Using NSBezierPath, the line is either anti-aliased (and the color is
blurred), or when turning anti-aliasing off, it is two pixels high.
Using CoreGraphics directly has the same effect.
I also tried setting the line width to something between 0 and 1, but it
makes no visible difference. 0 results in the line not being drawn at
all.
A current workaround is to use the NSFrameRect() call and draw a one
pixel high box, which indeed gives me a fine single pixel line without
anti-aliasing, but this call is limited to solid lines. So I cannot use
line patterns. This might be required in the future.
Am I missing something obvious here?
Thanks for your help,
Stefan
_______________________________________________
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.