sw_engine: fix a regression bug

After introducing the length measurement
of approximate and exact Bezier curves in
a8c0030d80
the calculation of the outline length still
used the approximate functions, while further
calculations took the exact value into account.
This discrepancy led to the creation of artifacts.

@Issue: https://github.com/thorvg/thorvg/issues/2021
This commit is contained in:
Mira Grudzinska 2024-03-03 22:02:35 +01:00 committed by Hermet Park
parent b95cb0441d
commit f535a6e139

View file

@ -356,7 +356,7 @@ static float _outlineLength(const RenderShape* rshape)
break; break;
} }
case PathCommand::CubicTo: { case PathCommand::CubicTo: {
length += bezLengthApprox({*(pts - 1), *pts, *(pts + 1), *(pts + 2)}); length += bezLength({*(pts - 1), *pts, *(pts + 1), *(pts + 2)});
pts += 3; pts += 3;
break; break;
} }