예제 #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);
 }
예제 #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);
            }
        }
예제 #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));
            }
        }
예제 #4
0
 public Filter(global::SVGImage.SVG.SVG svg, XmlNode node, Shape parent)
     : base(svg, node, parent)
 {
 }
예제 #5
0
 public FilterFeGaussianBlur(global::SVGImage.SVG.SVG svg, XmlNode node, Shape parent)
     : base(svg, node, parent)
 {
     StdDeviationX = StdDeviationY = XmlUtil.AttrValue(node, "stdDeviation", 0);
 }
예제 #6
0
 public AnimateColor(global::SVGImage.SVG.SVG svg, XmlNode node, Shape parent)
     : base(svg, node, parent)
 {
 }