(none) imager-devel
/ help / lists / applications / search /
 

Re: anti-alias, fractional coordinates

From: Tony Cook (
00361@xyz.molar.is)
Date: Sun 25 Feb 2001 - 04:48:43 UTC


On Sat, 24 Feb 2001, Arnar Mar Hrafnkelsson wrote:

>
> This is what is going on inside my head right now. I'd like to hear your
> opinions, not just the programmers but the people who have ideas on the
> API to this (since it is mostly about comming up with an api where you
> don't constantly have to be making "off by one" corrections.

Both the Windows GDI and Xlib treat lines as if the end-points were in the
centre of the pixel and fills as if the vertices were at the top-left of
the pixel.

For lines this is desirable because it means that a horizontal or vertical
line has full coverage over the pixels that the user wants filled.

The behaviour for filled areas is useful because it gives full coverage
for all pixels that are affected for a rectangle. It doesn't cover the
pixels that correspond with the bottom or right sides of the area, but
this behaviour is useful when butting multiple areas together.

Another possible useful behaviour for lines (and curves) is not filling
the final point, but I believe Imager already does that.

Tony