[cairo] Pixels Are Not Little Squares

Krzysztof Kosiński tweenk.pl at gmail.com
Mon Apr 25 07:19:54 UTC 2016


2016-04-24 19:40 GMT-07:00 Lawrence D'Oliveiro <ldo at geek-central.gen.nz>:
> On Sun, 24 Apr 2016 18:07:01 -0700, Krzysztof Kosiński wrote:
>
>> As far as I know, Cairo does use an approximation of the box filter
>> when sampling polygons, or at least does so by default.
>
> The available antialias settings for drawing shapes and text are
> documented here
> <http://cairographics.org/manual/cairo-cairo-t.html#cairo-antialias-t>.
> In my experience, the DEFAULT setting seems to be the same as BEST (not
> FAST, as you might expect).
>
> If there is a setting corresponding to a box filter, I would expect it
> to be FAST.

DEFAULT uses a box filter and SUBPIXEL uses a filter kernel that is
slightly different for each channel.

What I am talking about is the sampling filter, not the reconstruction
filter. They are different. The memo you linked only mentions the
reconstruction filter, but that is only relevant when reconstructing a
continuous image from point samples. In the case of shape rendering,
we have an effectively continuous image and want to sample it in a way
that preserves appearance better than point sampling.

Best regards, Krzysztof


More information about the cairo mailing list