Skip to content

Commit

Permalink
Fix by fvogel for DOS (Tk Ticket ea665e08f3)
Browse files Browse the repository at this point in the history
  • Loading branch information
oehhar committed Sep 22, 2020
1 parent 95f0e4e commit 3bc4b4c
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions generic/nanosvg.h
Original file line number Diff line number Diff line change
Expand Up @@ -1670,25 +1670,32 @@ static int nsvg__parseRotate(float* xform, const char* str)
static void nsvg__parseTransform(float* xform, const char* str)
{
float t[6];
int len;
nsvg__xformIdentity(xform);
while (*str)
{
if (strncmp(str, "matrix", 6) == 0)
str += nsvg__parseMatrix(t, str);
len = nsvg__parseMatrix(t, str);
else if (strncmp(str, "translate", 9) == 0)
str += nsvg__parseTranslate(t, str);
len = nsvg__parseTranslate(t, str);
else if (strncmp(str, "scale", 5) == 0)
str += nsvg__parseScale(t, str);
len = nsvg__parseScale(t, str);
else if (strncmp(str, "rotate", 6) == 0)
str += nsvg__parseRotate(t, str);
len = nsvg__parseRotate(t, str);
else if (strncmp(str, "skewX", 5) == 0)
str += nsvg__parseSkewX(t, str);
len = nsvg__parseSkewX(t, str);
else if (strncmp(str, "skewY", 5) == 0)
str += nsvg__parseSkewY(t, str);
len = nsvg__parseSkewY(t, str);
else{
++str;
continue;
}
if (len != 0) {
str += len;
} else {
++str;
continue;
}

nsvg__xformPremultiply(xform, t);
}
Expand Down

0 comments on commit 3bc4b4c

Please sign in to comment.