mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 21:53:41 +00:00
svg_loader SvgPath: Remove unnecessary optimization code
This condition(optimization) is not a step suggested by arc implementation. https://www.w3.org/TR/SVG11/implnote.html#ArcCorrectionOutOfRangeRadii (Step2) This code is useful if the arc is too small to represent. However, scaling often occurs in vectors, which can create unnecessary problems. example path <path d="M32.41,20.49a.41.41,0,1,1-.41-.42A.41.41,0,0,1,32.41,20.49Z" transform="translate(0)" fill="#020202"/>
This commit is contained in:
parent
f590571e3a
commit
355cc8c253
1 changed files with 0 additions and 7 deletions
|
@ -90,13 +90,6 @@ void _pathAppendArcTo(Array<PathCommand>* cmds, Array<Point>* pts, Point* cur, P
|
||||||
//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);
|
||||||
if ((rx < 0.5f) || (ry < 0.5f)) {
|
|
||||||
Point p = {x, y};
|
|
||||||
cmds->push(PathCommand::LineTo);
|
|
||||||
pts->push(p);
|
|
||||||
*cur = p;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
angle = angle * M_PI / 180.0f;
|
angle = angle * M_PI / 180.0f;
|
||||||
cosPhi = cosf(angle);
|
cosPhi = cosf(angle);
|
||||||
|
|
Loading…
Add table
Reference in a new issue