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

Bill Spitzak <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <CAL-8oAhw09A-QXjEVG88E+rbSS6bUucxgtss0MtGRikdYMi+6A@mail.gmail.com>
On Thu, May 18, 2017 at 5:04 AM, Lawrence D'Oliveiro
<[email protected]> wrote:
> On Thu, 18 May 2017 11:24:05 +0200, Guillermo Rodriguez wrote:
>
>> https://lists.cairographics.org/archives/cairo/2004-October/002039.html
>
> Worth (so to speak) also pointing out this bit:
>
>     As I talk about in the comment in the sample code, it may still be
>     beneficial to add some automatic snapping to cairo. It would simply
>     make it easier to achieve effects such as this---and in particular,
>     to achieve these effects regardless of what scaling the current
>     transformation might be performing.
>
> Was such an “automatic snapping” API ever added to Cairo? One that is
> independent of the current transformation?

No.

> Trick question: in fact, it already existed even as he spoke.

No it does not.

> It’s precisely the effect that *aliasing* achieves.

No it is not. A diagonal line draws with aliasing artifacts when
antialiasing is off. A hinting scheme would not do this. Therefore
they are not the same, no matter how many times you claim they are.

You seem to be under the impression that it is ok to destroy all lines
that are not horizontal or vertical. I think most people here believe
that to be a very bad solution.

I fully agree that a hinting (or "automatic snapping" as you call it)
addition to Cairo would be a VERY VERY good idea as it would stop
people like you from blindly turning antialiasing off and making the
display look like crap. Cairo should be doing this itself, in the
transformed coordinates. Although there are kludges to get around it,
I suspect most software using Cairo trying to avoid these artifacts
just assume the ctm is 1:1 with pixels, and it just seems weird to
transform to display coordinates, fiddle with them, then transform
back, just so cairo can transform them all over again.
-- 
cairo mailing list
[email protected]
https://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.