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

Lawrence D'Oliveiro ldo at geek-central.gen.nz
Mon Apr 25 23:02:08 UTC 2016


On Mon, 25 Apr 2016 09:09:34 -0700, Bill Spitzak wrote:

> No, turning off antialiasing is not the solution. This can be made
> obvious by setting the line width to slightly larger than 1, you will
> then get alternating 1 and 2 pixel thick lines.

Nope. Enclosed are magnified views showing line thicknesses set to 1.0
and 1.1. The grid represents integer device coordinates, the spots the
pixel positions. As you can see, the line widths are perfectly uniform
in both cases.

> Also diagonal lines and curves look horrible.

Which is not what the FAQ was asking, and was addressed in my answer
anyway.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: line_int.png
Type: image/png
Size: 2935 bytes
Desc: not available
URL: <https://lists.cairographics.org/archives/cairo/attachments/20160426/1460f652/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: line_thicker_int.png
Type: image/png
Size: 3079 bytes
Desc: not available
URL: <https://lists.cairographics.org/archives/cairo/attachments/20160426/1460f652/attachment-0001.png>


More information about the cairo mailing list