Added support for elliptical arc commands sequence after a single "a" #143
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Current behaviour:
print "*** Error: Invalid number of parameters for A command"
and abort parsing SVG file
for example this svg -
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50"><path d="M32.48,36.73c-2.22,2.64-2,5.9-2.21,9.28-.74-.14-1.33-.19-1.89-.36a17.79,17.79,0,0,1-10-7.67c-5.85-8.91-8.71-18.52-6.31-29.23.07-.3.12-.61.21-.91C13,5.2,13.28,5,16,5s5.6,0,8.4-.14a31.76,31.76,0,0,0,4.84-.64,4.22,4.22,0,0,1,3.57.53c2.49,1.92,4.26,4.37,4.1,7.67A27,27,0,0,0,38.4,23.13c.75,2,.43,2.77-1.5,3.72a13.74,13.74,0,0,1-16.42-3c-3.15-3.54-2.2-11.32,3.19-13A8.15,8.15,0,0,1,31.21,12c2,1.41,1.71,3.57,1.19,5.53s-1.33,4.11-3.88,4.43A3.54,3.54,0,0,1,25,20.61a4.29,4.29,0,0,1-.5-4.22,3.18,3.18,0,0,1,1-1.23c.89-.69,2.33-.67,2.74.06.55,1,0,1.59-.77,2.14a2.67,2.67,0,0,0-.42.52c.3.85.85.87,1.46.51a3,3,0,0,0,1.28-3,2.47,2.47,0,0,0-2-2,4.14,4.14,0,0,0-4.86,3.26q0,.19-.06.39a9.89,9.89,0,0,0,.64,3.64c1.1,2.76,5.41,3.37,7.77,1.2s3.24-7.17,1.72-10a4.26,4.26,0,0,0-1.24-1.35,9,9,0,0,0-14,5.48c-.77,4.39.33,7.69,3.9,10.43A33.59,33.59,0,0,1,29,33.54,21.8,21.8,0,0,0,32.48,36.73Z"/></svg>
contains
a31.76,31.76,0,0,0,4.84-.64,4.22,4.22,0,0,1,3.57.53c
"a" command with 14 arguments
this will give error because _operands.size() != 7
New behaviour:
After fix this example will correctly finish parsing
This svg is exported from Adobe Illustrator, so it is a common syntax
I've done this loop-arguments fix in the same way as implemented other commands in PocketSVG