[cairo] Pixels Are Not Little Squares

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


As far as I know, Cairo does use an approximation of the box filter
when sampling polygons, or at least does so by default. If it used
point (impulse) samples, you would get jagged edges. Thus, for
rendering polygons or lines (which is what is being done here), the
"little square" model is reasonable.

The "little square" model is not a good general description of how
image processing works, but it is reasonably good lie-to-children when
discussing box-filtered sampling.
https://en.wikipedia.org/wiki/Lie-to-children

2016-04-22 14:37 GMT-07:00 Lawrence D'Oliveiro <ldo at geek-central.gen.nz>:
> On Fri, 22 Apr 2016 13:22:19 -0700, Krzysztof Kosiński wrote:
>
>> The little square model is OK for Cairo, since it uses a box filter
>> for sampling tje omage when rendering. This is necessary for
>> antialiasing.
>
> No it doesn’t, and no it isn’t. You’re probably thinking of image
> resampling, and Cairo offers a choice of filters for that
> <http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-filter-t>.
> And the underlying Pixman layer offers even more.
> --
> cairo mailing list
> cairo at cairographics.org
> https://lists.cairographics.org/mailman/listinfo/cairo


More information about the cairo mailing list