mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-10 14:41:50 +00:00
lottie/builder: hotfix, invalid stroking scaling.
There is a buggy workaround code that rewinds the stroke scaling. Issue: https://github.com/thorvg/thorvg/issues/1730
This commit is contained in:
parent
ed9f46a1fc
commit
2e423e5c2a
1 changed files with 2 additions and 1 deletions
|
@ -194,7 +194,8 @@ static void _updateTransform(TVG_UNUSED LottieGroup* parent, LottieObject** chil
|
|||
|
||||
//FIXME: preserve the stroke width. too workaround, need a better design.
|
||||
if (P(ctx.propagator)->rs.strokeWidth() > 0.0f) {
|
||||
ctx.propagator->stroke(P(ctx.propagator)->rs.strokeWidth() / sqrt(matrix.e11 * matrix.e11 + matrix.e12 * matrix.e12));
|
||||
auto denominator = sqrtf(matrix.e11 * matrix.e11 + matrix.e12 * matrix.e12);
|
||||
if (denominator > 1.0f) ctx.propagator->stroke(ctx.propagator->strokeWidth() / denominator);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue