Ejemplo n.º 1
0
 public AnimateTransform(global::SVGImage.SVG.SVG svg, XmlNode node, Shape parent)
     : base(svg, node, parent)
 {
     this.Type          = (AnimateTransformType)Enum.Parse(typeof(AnimateTransformType), XmlUtil.AttrValue(node, "type", "translate"), true);
     this.From          = XmlUtil.AttrValue(node, "from", null);
     this.To            = XmlUtil.AttrValue(node, "to", null);
     this.AttributeName = XmlUtil.AttrValue(node, "attributeName", null);
     this.RepeatType    = XmlUtil.AttrValue(node, "repeatCount", "indefinite");
     this.Values        = XmlUtil.AttrValue(node, "values", null);
 }
Ejemplo n.º 2
0
        public Animate(global::SVGImage.SVG.SVG svg, XmlNode node, Shape parent)
            : base(svg, node, parent)
        {
            this.From          = XmlUtil.AttrValue(node, "from", null);
            this.To            = XmlUtil.AttrValue(node, "to", null);
            this.AttributeName = XmlUtil.AttrValue(node, "attributeName", null);
            this.RepeatType    = XmlUtil.AttrValue(node, "repeatCount", "indefinite");
            this.Values        = XmlUtil.AttrValue(node, "values", null);

            this.hRef = XmlUtil.AttrValue(node, "xlink:href", string.Empty);
            if (this.hRef.StartsWith("#"))
            {
                this.hRef = this.hRef.Substring(1);
            }
        }
Ejemplo n.º 3
0
        public AnimationBase(global::SVGImage.SVG.SVG svg, XmlNode node, Shape parent)
            : base(svg, node, parent)
        {
            var d = XmlUtil.AttrValue(node, "dur", "");

            if (d.EndsWith("ms"))
            {
                Duration = TimeSpan.FromMilliseconds(double.Parse(d.Substring(0, d.Length - 2)));
            }
            else if (d.EndsWith("s"))
            {
                Duration = TimeSpan.FromSeconds(double.Parse(d.Substring(0, d.Length - 1)));
            }
            else
            {
                Duration = TimeSpan.FromSeconds(double.Parse(d));
            }
        }
Ejemplo n.º 4
0
 public Filter(global::SVGImage.SVG.SVG svg, XmlNode node, Shape parent)
     : base(svg, node, parent)
 {
 }
Ejemplo n.º 5
0
 public FilterFeGaussianBlur(global::SVGImage.SVG.SVG svg, XmlNode node, Shape parent)
     : base(svg, node, parent)
 {
     StdDeviationX = StdDeviationY = XmlUtil.AttrValue(node, "stdDeviation", 0);
 }
Ejemplo n.º 6
0
 public AnimateColor(global::SVGImage.SVG.SVG svg, XmlNode node, Shape parent)
     : base(svg, node, parent)
 {
 }