Re: PATCH cairo-www: Simpler explanation for how to get sharp, single-pixel-wide lines
Guillermo Rodriguez <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <CABDcavbUkHgywpx_ypOLzKBimy24HpDQ9mO5MbGe=hZcgDXyQQ@mail.gmail.com> |
2017-05-17 12:50 GMT+02:00 Lawrence D'Oliveiro <[email protected]>: > On Wed, 17 May 2017 12:29:15 +0200, Guillermo Rodriguez wrote: > >> It occurs because integer coordinates map to points half way >> between sample point locations ... > > That’s a common misconception. It's taken straight from the current Cairo FAQ. Again: A common use case is that you want to have antialiasing in general BUT at the same time be able to draw 1 pixel wide vertical or horizontal lines that don't look "blurry". The current text describes an approach which achieves exactly that by adjusting endpoints of horizontal / vertical lines by 0.5 in the appropriate direction. That gets you perfect sharp, single-pixel-wide vertical and horizontal lines without the need to turn off antialiasing. Your "simpler explanation" proposal misses that completely. Guillermo -- cairo mailing list [email protected] https://lists.cairographics.org/mailman/listinfo/cairo