[cairo] Pixman centre pixel sampling in unantialiased mode.
Soeren Sandmann
sandmann at daimi.au.dk
Fri Aug 28 04:09:17 PDT 2009
M Joonas Pihlaja <jpihlaja at cc.helsinki.fi> writes:
> A follow-up to a minor point on the pixman unantialised rasterisation
> brought up on #cairo:
>
> The pixman rasteriser treats edges hitting exactly the sample point at
> the pixel centre as being outside for top/left and inside for
> bottom/right edges. This can be seen from the attached test case.
> The same issue occurs in the antialiased case, but there the issue is
> much less noticeable.
>
> I'm also attaching a small patch against pixman to change it to
> consider top/left inside and bot/right outside, but I haven't really
> tested it at all apart from this particular case. Seems to work. :)
Sorry to be slow to reply to this.
I agree that the exact center of the pixel should be considered
outside for top/left and inside for bottom/right edges, so I'm fine
with this patch going in after 0.16.0.
Ideally, we'd do the same in the antialiased case, but as you say it's
much less noticable there.
I don't think this should go in 0.16.0 because it is the sort of thing
that could cause bugs in corner cases (no pun intended), so I'd rather
have it in the next development series.
Thanks,
Soren
More information about the cairo
mailing list