loader/svg: Remove duplicate if-check in pathAppendArcTo

The if-check to skip-rule when drawing an arc path is already checked in line 476.
In addition, since the float type equal check is performed in the range of 1/256,
unintentional skiped may occur. Therefore, remove duplicate code.
https://www.w3.org/TR/SVG2/paths.html#ArcOutOfRangeParameters

test file: SVG_FILE_147893.svg
related issue: https://github.com/thorvg/thorvg/issues/1255
This commit is contained in:
JunsuChoi 2024-03-18 11:18:32 +09:00 committed by Hermet Park
parent c6601d1eee
commit c9e4feb9dc

View file

@ -122,9 +122,6 @@ void _pathAppendArcTo(Array<PathCommand>* cmds, Array<Point>* pts, Point* cur, P
sx = cur->x; sx = cur->x;
sy = cur->y; sy = cur->y;
//If start and end points are identical, then no arc is drawn
if ((fabsf(x - sx) < (1.0f / 256.0f)) && (fabsf(y - sy) < (1.0f / 256.0f))) return;
//Correction of out-of-range radii, see F6.6.1 (step 2) //Correction of out-of-range radii, see F6.6.1 (step 2)
rx = fabsf(rx); rx = fabsf(rx);
ry = fabsf(ry); ry = fabsf(ry);