mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 13:43:43 +00:00
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:
parent
c6601d1eee
commit
c9e4feb9dc
1 changed files with 0 additions and 3 deletions
|
@ -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);
|
||||||
|
|
Loading…
Add table
Reference in a new issue