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; }
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); }
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; }
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); }