public static GraphicsPath CreatePath(SvgCircleElement element) { GraphicsPath gp = new GraphicsPath(); float _cx = (float)element.Cx.AnimVal.Value; float _cy = (float)element.Cy.AnimVal.Value; float _r = (float)element.R.AnimVal.Value; gp.AddEllipse(_cx - _r, _cy - _r, _r * 2, _r * 2); return gp; }
public static Geometry CreateGeometry(SvgCircleElement element) { double _cx = Math.Round(element.Cx.AnimVal.Value, 4); double _cy = Math.Round(element.Cy.AnimVal.Value, 4); double _r = Math.Round(element.R.AnimVal.Value, 4); if (_r <= 0) { return null; } EllipseGeometry geometry = new EllipseGeometry(new Point(_cx, _cy), _r, _r); return geometry; }