mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-15 12:34:30 +00:00
sw_engine: fix masked translucent rect
This commit is contained in:
parent
69b1fb8208
commit
ebfdf2102e
1 changed files with 2 additions and 1 deletions
|
@ -383,7 +383,8 @@ static bool _rasterMattedRect(SwSurface* surface, const SwBBox& region, uint8_t
|
||||||
auto dst = &buffer[y * surface->stride];
|
auto dst = &buffer[y * surface->stride];
|
||||||
auto cmp = &cbuffer[y * surface->compositor->image.stride * csize];
|
auto cmp = &cbuffer[y * surface->compositor->image.stride * csize];
|
||||||
for (uint32_t x = 0; x < w; ++x, ++dst, cmp += csize) {
|
for (uint32_t x = 0; x < w; ++x, ++dst, cmp += csize) {
|
||||||
*dst = INTERPOLATE(color, *dst, alpha(cmp));
|
auto tmp = ALPHA_BLEND(color, alpha(cmp));
|
||||||
|
*dst = tmp + ALPHA_BLEND(*dst, IA(tmp));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//8bits grayscale
|
//8bits grayscale
|
||||||
|
|
Loading…
Add table
Reference in a new issue