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

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

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