sw_engine: corrected the blur feathering region.

issue: https://github.com/thorvg/thorvg/issues/2892
This commit is contained in:
Hermet Park 2024-10-22 13:31:44 +09:00 committed by Hermet Park
parent c14382f3e3
commit 41c1171197

View file

@ -37,13 +37,12 @@ struct SwGaussianBlur
static void _gaussianExtendRegion(RenderRegion& region, int extra, int8_t direction) static void _gaussianExtendRegion(RenderRegion& region, int extra, int8_t direction)
{ {
//bbox region expansion for feathering //bbox region expansion for feathering
if (direction == 0 || direction == 1) { if (direction != 2) {
region.x = -extra; region.x = -extra;
region.y = -extra;
}
if (direction == 0 || direction == 2) {
region.w = extra * 2; region.w = extra * 2;
}
if (direction != 1) {
region.y = -extra;
region.h = extra * 2; region.h = extra * 2;
} }
} }