mirror of
https://github.com/thorvg/thorvg.git
synced 2025-07-25 23:59:12 +00:00
Revert "svg_loader SvgPath: Added corner case handling for flags of Arc"
This reverts commit 5da4c81138
.
Please double-check this regression bug:
examples/images/samsung-galaxy-s.svg
This commit is contained in:
parent
e74ce7e315
commit
55a5b9492b
1 changed files with 7 additions and 6 deletions
|
@ -57,15 +57,16 @@ static bool _parseNumber(char** content, float* number)
|
|||
|
||||
static bool _parseFlag(char** content, int* number)
|
||||
{
|
||||
if (*(*content) != '0' && *(*content) != '1') return false;
|
||||
*number = *(*content) - '0';
|
||||
*content = _skipComma(*content + 1);
|
||||
if (*(*content) == '.') return false;
|
||||
|
||||
char* end = NULL;
|
||||
*number = strtol(*content, &end, 10);
|
||||
//If the start of string is not number or a number was a float
|
||||
if ((*content) == end || *end == '.') return false;
|
||||
//If a flag has a different value than 0 or 1
|
||||
if (*number != 0 && *number != 1) return false;
|
||||
*content = _skipComma(end);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void _pathAppendArcTo(Array<PathCommand>* cmds, Array<Point>* pts, Point* cur, Point* curCtl, float x, float y, float rx, float ry, float angle, bool largeArc, bool sweep)
|
||||
{
|
||||
float cxp, cyp, cx, cy;
|
||||
|
|
Loading…
Add table
Reference in a new issue