RazrFalcon / tiny-skia

A tiny Skia subset ported to Rust
BSD 3-Clause "New" or "Revised" License
1.05k stars 67 forks source link

Fix rounding error in non-AA curve edge smoothing #115

Closed ColdPaleLight closed 3 months ago

ColdPaleLight commented 3 months ago

This change ensures precise rounding to the nearest 1/8 pixel by adding 1/16 pixel (in dot6 format) before the shift operation in cases where 'shiftAA' is 0. See http://review.skia.org/820656 for details.

RazrFalcon commented 3 months ago

Oh wow, thanks for back-porting it!