[cairo] Drawing diagonal lines with antialiasing off

Bill Spitzak spitzak at d2.com
Wed Sep 28 11:44:59 PDT 2005


I think there is some misunderstanding. IN NO WAY am I proposing any 
kind of compatability with X11!!

Telling the users to offset by .5 will result in all images being 
filtered and put fuzzy edges on rectangles. I think it unlikely users 
will realize they must draw either the lines or the shapes+images at .5 
boundaries, instead it is likely that they will turn off antialiasing 
(one of the reasons I really did not like adding the ability to disable 
antialiasing is that amateur programmers will see that as a solution to 
all their drawing problems). The result is that Cairo output will look 
crappy compared to other api's such as Quartz and probably Longhorn.

Using linewidth of 0 for hairlines is well established by PostScript, 
OpenGL, PDF, and many other graphics API's.

Jason Dorje Short wrote:

> Xlib has a fixed definition of how a line is drawn, which is based on 
> integer coordinates (I've read this definition before but now I can't 
> find it).  Cairo has a different definition that uses floating-point 
> coordinates.


More information about the cairo mailing list