Re: Not assuming 1 point = 1 pixel
Re: Not assuming 1 point = 1 pixel
- Subject: Re: Not assuming 1 point = 1 pixel
- From: John Stiles <email@hidden>
- Date: Thu, 8 Jul 2004 08:32:42 -0700
If you imagine that, say, screen DPIs suddenly increased by a factor of
N, then I would imagine you'd want your lines to be N times wider
anyway. If N is non-integral, then you can't make them crisp and clean.
There isn't any way to draw a 1.5 pixel wide line without using gray
pixels.
If you would prefer lines that are slightly over- or under-thick to
antialiasing, you can disable antialiasing entirely, but I wouldn't
recommend it.
On Jul 8, 2004, at 7:21 AM, Ken Tabb wrote:
>
Hi folks,
>
>
does anyone have any general advice for Cocoa (/ Quartz 2D) drawing
>
algorithms that don't assume 1 point = 1 pixel? I'd love to break that
>
assumption, but still want the outlines of my drawn objects crispy
>
clean.
>
>
At the moment you can draw a line with a 0.5 pixel offset to get it
>
drawn direct on one pixel, and therefore nice thin line, vs. drawing on
>
integer coords and getting smudged lines (where the line is 1/2 on one
>
pixel and half on another). I'm happy breaking that 0.5 offset trick,
>
if it means there's another way that I can guarantee crispy clean
>
lines. Or maybe I'm missing something really obvious and have been
>
using a hack all this while 8^)
>
>
Any clues would be most welcome!
>
>
Cheers in advance,
>
Ken
>
>
- - - - - - - - - -
>
Dr. Ken Tabb
>
Mac & UNIX Technical bloke (C, C++, Obj-C, Java) - Health & Human
>
Sciences
>
Machine Vision & Neural Network researcher bloke - Computer Science
>
Dept
>
University of Hertfordshire, UK
>
http://www.health.herts.ac.uk/ken/
>
>
Certified non-Microsoft Solution Provider
>
_______________________________________________
>
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.
_______________________________________________
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.