예제 #1
0
 public static XElement ToXml(RadialGradientFillStyleRGB fillStyle)
 {
     var res = new XElement(RADIAL_GRADIENT);
     AddSpreadMode(res, fillStyle.Gradient.SpreadMode);
     AddInterpolationMode(res, fillStyle.Gradient.InterpolationMode);
     AddMatrix(res, fillStyle.GradientMatrix);
     res.Add(XGradientRecords.ToXml(fillStyle.Gradient.GradientRecords));
     return res;
 }
예제 #2
0
        public static XElement ToXml(RadialGradientFillStyleRGB fillStyle)
        {
            var res = new XElement(RADIAL_GRADIENT);

            AddSpreadMode(res, fillStyle.Gradient.SpreadMode);
            AddInterpolationMode(res, fillStyle.Gradient.InterpolationMode);
            AddMatrix(res, fillStyle.GradientMatrix);
            res.Add(XGradientRecords.ToXml(fillStyle.Gradient.GradientRecords));
            return(res);
        }
예제 #3
0
 public static RadialGradientFillStyleRGB FromXmlRGB(XElement xFillStyle)
 {
     var res = new RadialGradientFillStyleRGB {
         Gradient = new GradientRGB {
             SpreadMode = GetSpreadMode(xFillStyle),
             InterpolationMode = GetInterpolationMode(xFillStyle),
         },
         GradientMatrix = GetMatrix(xFillStyle)
     };
     var xGradientColors = xFillStyle.Element("gradientColors");
     XGradientRecords.FromXml(xGradientColors, res.Gradient.GradientRecords);
     return res;
 }
예제 #4
0
        public static RadialGradientFillStyleRGB FromXmlRGB(XElement xFillStyle)
        {
            var res = new RadialGradientFillStyleRGB {
                Gradient = new GradientRGB {
                    SpreadMode        = GetSpreadMode(xFillStyle),
                    InterpolationMode = GetInterpolationMode(xFillStyle),
                },
                GradientMatrix = GetMatrix(xFillStyle)
            };
            var xGradientColors = xFillStyle.Element("gradientColors");

            XGradientRecords.FromXml(xGradientColors, res.Gradient.GradientRecords);
            return(res);
        }