[cairo] Pixman sampling coordinates
Bill Spitzak
spitzak at thefoundry.co.uk
Tue Jan 22 20:47:27 PST 2008
Bill Spitzak wrote:
> Carl Worth wrote:
>
>> rotate-image-surface-paint is passing in the no-offset case while
>> failing in the case of a 25x25 offset.
>>
>> Something's really fishy there, because an integer offset should not
>> be changing the sampling behavior.
>>
>> So, chalk another point up for the test suite. But, Bertram, what did
>> we miss in the image sampling code?
>
> Could this be rint rounding x.5 to the nearest *even* number. Ie if x is
> odd it rounds up, but if x is even it rounds down.
Another possibility is that regular int() rounding is being done, which
rounds toward zero. This would cause things less than zero to round
right, while greater than zero to round left.
More information about the cairo
mailing list