[cairo] PATCH cairo-www: Simpler explanation for how to get sharp, single-pixel-wide lines

Bill Spitzak spitzak at gmail.com
Tue Apr 26 18:15:58 UTC 2016


I recommend you try angles other than 45 degrees, and try putting the 1.1
thick lines at a non-integer vertical position.

It seems like even with antialiasing off and 45 degrees you are forced to
adjust the line ends to be pixel centers so this is not buying you
anything. I think the antialiased version with the ends at pixel centers
(diag_int_aa.png) is the best result.


On Mon, Apr 25, 2016 at 10:57 PM, Lawrence D'Oliveiro <
ldo at geek-central.gen.nz> wrote:

> On Mon, 25 Apr 2016 09:09:34 -0700, Bill Spitzak wrote:
>
> > Also diagonal lines and curves look horrible.
>
> Which, I think, illustrates the difference between guessing and actually
> trying things out.
>
> Enclosed are four examples illustrating what happens to 45° diagonal
> lines. As you can see, the results are the opposite from what happens
> to exactly vertical/horizontal lines, namely the lines at
> integer-plus-half coordinates are thicker and blurrier, while the ones
> at integer coordinates are the thinnest and sharpest.
>
> In other words, my recommendation to turn antialiasing off works under
> a wider range of conditions than the existing FAQ answer.
>
> --
> cairo mailing list
> cairo at cairographics.org
> https://lists.cairographics.org/mailman/listinfo/cairo
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cairographics.org/archives/cairo/attachments/20160426/e3e68fb9/attachment.html>


More information about the cairo mailing list