1- using System ;
1+ using SVGImage . SVG . Utils ;
2+ using System ;
3+ using System . Collections . Generic ;
24using System . IO ;
3- using System . Xml ;
45using System . Linq ;
5- using System . Collections . Generic ;
6- using SVGImage . SVG . Utils ;
7-
86using System . Windows ;
97using System . Windows . Media ;
108using System . Windows . Media . Animation ;
9+ using System . Xml ;
1110
1211namespace SVGImage . SVG
1312{
1413 using Animation ;
15- using Shapes ;
1614 using FileLoaders ;
17-
15+ using Shapes ;
16+ using System . Globalization ;
17+
1818 /// <summary>
1919 /// This is the class that creates the WPF Drawing object based on the information from the <see cref="SVG"/> class.
2020 /// </summary>
@@ -261,8 +261,8 @@ internal DrawingGroup LoadGroup(IList<Shape> elements, Rect? viewBox, bool isSwi
261261 {
262262 var animation = new DoubleAnimation
263263 {
264- From = double . Parse ( animateTransform . From ) ,
265- To = double . Parse ( animateTransform . To ) ,
264+ From = double . Parse ( animateTransform . From , NumberStyles . Number , CultureInfo . InvariantCulture ) ,
265+ To = double . Parse ( animateTransform . To , NumberStyles . Number , CultureInfo . InvariantCulture ) ,
266266 Duration = animateTransform . Duration
267267 } ;
268268 animation . RepeatBehavior = RepeatBehavior . Forever ;
@@ -279,7 +279,7 @@ internal DrawingGroup LoadGroup(IList<Shape> elements, Rect? viewBox, bool isSwi
279279 if ( animate . AttributeName == "r" )
280280 {
281281 var animation = new DoubleAnimationUsingKeyFrames ( ) { Duration = animate . Duration } ;
282- foreach ( var d in animate . Values . Split ( ';' ) . Select ( x => new LinearDoubleKeyFrame ( double . Parse ( x ) ) ) )
282+ foreach ( var d in animate . Values . Split ( ';' ) . Select ( x => new LinearDoubleKeyFrame ( double . Parse ( x , NumberStyles . Number , CultureInfo . InvariantCulture ) ) ) )
283283 {
284284 animation . KeyFrames . Add ( d ) ;
285285 }
@@ -292,7 +292,7 @@ internal DrawingGroup LoadGroup(IList<Shape> elements, Rect? viewBox, bool isSwi
292292 {
293293 var animation = new PointAnimationUsingKeyFrames ( ) { Duration = animate . Duration } ;
294294 foreach ( var d in animate . Values . Split ( ';' ) . Select ( _ => new LinearPointKeyFrame (
295- new Point ( double . Parse ( _ ) , ( ( EllipseGeometry ) g ) . Center . Y ) ) ) )
295+ new Point ( double . Parse ( _ , NumberStyles . Number , CultureInfo . InvariantCulture ) , ( ( EllipseGeometry ) g ) . Center . Y ) ) ) )
296296 {
297297 animation . KeyFrames . Add ( d ) ;
298298 }
@@ -303,7 +303,7 @@ internal DrawingGroup LoadGroup(IList<Shape> elements, Rect? viewBox, bool isSwi
303303 {
304304 var animation = new PointAnimationUsingKeyFrames ( ) { Duration = animate . Duration } ;
305305 foreach ( var d in animate . Values . Split ( ';' ) . Select ( _ => new LinearPointKeyFrame (
306- new Point ( ( ( EllipseGeometry ) g ) . Center . X , double . Parse ( _ ) ) ) ) )
306+ new Point ( ( ( EllipseGeometry ) g ) . Center . X , double . Parse ( _ , NumberStyles . Number , CultureInfo . InvariantCulture ) ) ) ) )
307307 {
308308 animation . KeyFrames . Add ( d ) ;
309309 }
0 commit comments