mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-13 19:44:28 +00:00
svg_loader: fixing viewBox clipping
For vw=width and vh=height, vx or vy > 0 had no effect. Fixed
This commit is contained in:
parent
e186bb4a82
commit
1abee9f8d5
1 changed files with 1 additions and 1 deletions
|
@ -548,7 +548,7 @@ unique_ptr<Scene> svgSceneBuild(SvgNode* node, float vx, float vy, float vw, flo
|
|||
Matrix m = {sx, 0, -tvx, 0, sy, -tvy, 0, 0, 1};
|
||||
docNode->transform(m);
|
||||
}
|
||||
} else if (vx < 0 || vy < 0) {
|
||||
} else if (fabs(vx) > FLT_EPSILON || fabs(vy) > FLT_EPSILON) {
|
||||
docNode->translate(-vx, -vy);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue