Ejemplo n.º 1
0
 public static CT_GradientFill Parse(XmlNode node, XmlNamespaceManager namespaceManager)
 {
     if (node == null)
         return null;
     CT_GradientFill ctObj = new CT_GradientFill();
     if (node.Attributes["type"] != null)
         ctObj.type = (ST_GradientType)Enum.Parse(typeof(ST_GradientType), node.Attributes["type"].Value);
     ctObj.degree = XmlHelper.ReadDouble(node.Attributes["degree"]);
     ctObj.left = XmlHelper.ReadDouble(node.Attributes["left"]);
     ctObj.right = XmlHelper.ReadDouble(node.Attributes["right"]);
     ctObj.top = XmlHelper.ReadDouble(node.Attributes["top"]);
     ctObj.bottom = XmlHelper.ReadDouble(node.Attributes["bottom"]);
     ctObj.stop = new List<CT_GradientStop>();
     foreach (XmlNode childNode in node.ChildNodes)
     {
         if (childNode.LocalName == "stop")
             ctObj.stop.Add(CT_GradientStop.Parse(childNode, namespaceManager));
     }
     return ctObj;
 }
Ejemplo n.º 2
0
        public static CT_Fill Parse(XmlNode node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_Fill ctObj = new CT_Fill();

            foreach (XmlNode childNode in node.ChildNodes)
            {
                if (childNode.LocalName == "patternFill")
                {
                    ctObj.patternFill = CT_PatternFill.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "gradientFill")
                {
                    ctObj.gradientFill = CT_GradientFill.Parse(childNode, namespaceManager);
                }
            }
            return(ctObj);
        }
Ejemplo n.º 3
0
 public CT_GradientFill AddNewGradientFill()
 {
     this.gradientFillField = new CT_GradientFill();
     return(this.gradientFillField);
 }