You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -53,50 +43,40 @@ public SVGPath(XmlReader reader) //: this()
53
43
for(inti=0;i<d.Length;i++)
54
44
{
55
45
charc=d[i];// Get current char
46
+
charlowerC=char.ToLower(d[i]);// Get current char
56
47
57
-
if(_dAttributesRegex.ContainsKey(c))
48
+
if(_dAttributeRegex.ContainsKey(lowerC))
58
49
{
59
-
MatchCollectionmatches=_dAttributesRegex[c].Matches(d,startIndex);// Retrieve the associated regular expression
60
-
match=_dAttributesRegex[c].Match(d,startIndex);// Retrieve the associated regular expression
61
-
switch(c)
50
+
match=_dAttributeRegex[lowerC].Match(d,startIndex);// Retrieve the associated regular expression
51
+
switch(lowerC)
62
52
{
63
-
case'M':
64
53
case'm':
65
54
DrawAttributes.Add(newMoveTo(match.Groups[1],match.Groups[2],c=='m'));// 'm' is relative and 'M' absolute
66
55
break;
67
-
case'l':
68
56
case'L':
69
57
DrawAttributes.Add(newLineTo(match.Groups[1],match.Groups[2],c=='l'));// 'l' is relative and 'L' absolute
70
58
break;
71
-
case'H':
72
59
case'h':
73
60
DrawAttributes.Add(newHorizontalLineTo(match.Groups[1],c=='h'));// 'h' is relative and 'H' absolute
74
61
break;
75
-
case'V':
76
62
case'v':
77
63
DrawAttributes.Add(newVerticalLineTo(match.Groups[1],c=='v'));// 'v' is relative and 'V' absolute
78
64
break;
79
-
case'C':
80
65
case'c':
81
66
DrawAttributes.Add(newCurveTo(match.Groups[1],match.Groups[2],match.Groups[3],match.Groups[4],match.Groups[5],match.Groups[6],c=='c'));// 'c' is relative and 'C' absolute
82
67
break;
83
-
case'S':
84
68
case's':
85
69
DrawAttributes.Add(newSmoothCurveTo(match.Groups[1],match.Groups[2],match.Groups[3],match.Groups[4],c=='s'));// 's' is relative and 'S' absolute
86
70
break;
87
-
case'Q':
88
71
case'q':
89
72
DrawAttributes.Add(newQuadraticBezierCurveTo(match.Groups[1],match.Groups[2],match.Groups[3],match.Groups[4],c=='q'));// 'q' is relative and 'Q' absolute
90
73
break;
91
-
case'T':
92
74
case't':
93
75
DrawAttributes.Add(newSmoothQuadraticBezierCurveTo(match.Groups[1],match.Groups[2],c=='t'));// 't' is relative and 'T' absolute
94
76
break;
95
-
case'A':
96
77
case'a':
97
78
DrawAttributes.Add(newEllipticalArc(match.Groups[1],match.Groups[2],match.Groups[3],match.Groups[4],match.Groups[5],match.Groups[6],match.Groups[7],c=='a'));// 'a' is relative and 'A' absolute
0 commit comments