mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-13 19:44:28 +00:00
sw_engine: fix translucent grad rastering
8bit translucent gradient rle were missing AA. Fixed.
This commit is contained in:
parent
7e30bd850c
commit
99153ef26e
1 changed files with 2 additions and 1 deletions
|
@ -1507,7 +1507,8 @@ static bool _rasterTranslucentGradientRle(SwSurface* surface, const SwRle* rle,
|
|||
} else if (surface->channelSize == sizeof(uint8_t)) {
|
||||
for (uint32_t i = 0; i < rle->size; ++i, ++span) {
|
||||
auto dst = &surface->buf8[span->y * surface->stride + span->x];
|
||||
fillMethod()(fill, dst, span->y, span->x, span->len, _opMaskAdd, 255);
|
||||
if (span->coverage == 255) fillMethod()(fill, dst, span->y, span->x, span->len, _opMaskNone, 255);
|
||||
else fillMethod()(fill, dst, span->y, span->x, span->len, _opMaskAdd, span->coverage);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
Loading…
Add table
Reference in a new issue