fix parsing SVG strings to paths with comma delimiters

BUG=skia:583
R=reed@google.com

Review URL: https://codereview.chromium.org/885103002
This commit is contained in:
caryclark 2015-01-29 09:45:44 -08:00 committed by Commit bot
parent 54443932e8
commit 52ee813990
2 changed files with 5 additions and 0 deletions

View File

@ -86,6 +86,8 @@ bool SkParsePath::FromSVGString(const char data[], SkPath* result) {
if (op == '\0') {
return false;
}
} else if (is_sep(ch)) {
data = skip_sep(data);
} else {
op = ch;
relative = false;

View File

@ -31,6 +31,9 @@ static struct {
const char* fStr;
const SkRect fBounds;
} gRec[] = {
{ "M1,1 l-2.58-2.828-3.82-0.113, 1.9-3.3223-1.08-3.6702, 3.75,0.7744,3.16-2.1551,"
"0.42,3.8008,3.02,2.3384-3.48,1.574-1.29,3.601z",
{ -5.39999962f, -10.3142f, 5.77000046f, 1.f } },
{ "", { 0, 0, 0, 0 } },
{ "M0,0L10,10", { 0, 0, SkIntToScalar(10), SkIntToScalar(10) } },
{ "M-5.5,-0.5 Q 0 0 6,6.50",