mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 05:33:36 +00:00
sw_engine: corrected the blur feathering region.
issue: https://github.com/thorvg/thorvg/issues/2892
This commit is contained in:
parent
c14382f3e3
commit
41c1171197
1 changed files with 4 additions and 5 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue