mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-07 21:23:32 +00:00
sw_engine: hotfix range broken
hotfix for release. need to review the logic again
This commit is contained in:
parent
2b32c24712
commit
9b9a0308c8
1 changed files with 4 additions and 12 deletions
|
@ -271,19 +271,11 @@ static void _dropShadowShift(uint32_t* dst, uint32_t* src, int stride, SwBBox& r
|
|||
auto translucent = (direct || opacity < 255);
|
||||
|
||||
//shift offset
|
||||
if (region.min.x + offset.x < 0) {
|
||||
src -= offset.x;
|
||||
} else {
|
||||
dst += offset.x;
|
||||
w -= offset.x;
|
||||
}
|
||||
if (region.min.x + offset.x < 0) src -= offset.x;
|
||||
else dst += offset.x;
|
||||
|
||||
if (region.min.y + offset.y < 0) {
|
||||
src -= (offset.y * stride);
|
||||
} else {
|
||||
dst += (offset.y * stride);
|
||||
h -= offset.y;
|
||||
}
|
||||
if (region.min.y + offset.y < 0) src -= (offset.y * stride);
|
||||
else dst += (offset.y * stride);
|
||||
|
||||
for (auto y = 0; y < h; ++y) {
|
||||
if (translucent) rasterTranslucentPixel32(dst, src, w, opacity);
|
||||
|
|
Loading…
Add table
Reference in a new issue