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
@@ -48,6 +53,13 @@ public SVGPath(XmlReader reader)
48
53
if(_dAttributeRegex.ContainsKey(lowerC))
49
54
{
50
55
match=_dAttributeRegex[lowerC].Match(d,startIndex);// Retrieve the associated regular expression
56
+
57
+
if(startIndex==0)
58
+
{
59
+
_x0=Convert.ToInt32(match.Groups[1].Value);
60
+
_y0=Convert.ToInt32(match.Groups[2].Value);
61
+
}
62
+
51
63
switch(lowerC)
52
64
{
53
65
case'm':
@@ -78,7 +90,7 @@ public SVGPath(XmlReader reader)
78
90
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
79
91
break;
80
92
case'z':
81
-
DrawAttributes.Add(newClosePath());
93
+
DrawAttributes.Add(newLineTo(_x0,_y0));
82
94
break;
83
95
default:
84
96
thrownewException("Unknowed properties in d");
@@ -87,7 +99,7 @@ public SVGPath(XmlReader reader)
87
99
}
88
100
}
89
101
90
-
stringcolor=reader["fill"]??thrownewException("color not here");
Copy file name to clipboardExpand all lines: FreeFrame/Components/Shapes/SVGRectangle.cs
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -25,8 +25,8 @@ public SVGRectangle(XmlReader reader) : this(
25
25
Convert.ToInt32(reader["x"]),
26
26
Convert.ToInt32(reader["y"]),
27
27
Convert.ToInt32(reader["rx"]),
28
-
Convert.ToInt32(reader["ry"]),
29
-
Convert.ToString(reader["fill"]))// TODO: Error handler if one of the properties in reader is note here, it should be dynamic
28
+
Convert.ToInt32(reader["ry"]),
29
+
Convert.ToString(reader["fill"]==null?DefaultColor:reader["fill"]))// TODO: Error handler if one of the properties in reader is note here, it should be dynamic
0 commit comments