Exemplo n.º 1
0
        /// <summary>
        /// Parses filter from xml.
        /// </summary>
        /// <param name="xFilter">Xml element to be parsed.</param>
        /// <returns></returns>
        public static BaseFilter FromXml(XElement xFilter)
        {
            switch (xFilter.Name.LocalName)
            {
            case XDropShadowFilter.TAG_NAME:
                return(XDropShadowFilter.FromXml(xFilter));

            case XBlurFilter.TAG_NAME:
                return(XBlurFilter.FromXml(xFilter));

            case XGlowFilter.TAG_NAME:
                return(XGlowFilter.FromXml(xFilter));

            case XBevelFilter.TAG_NAME:
                return(XBevelFilter.FromXml(xFilter));

            case XGradientGlowFilter.TAG_NAME:
                return(XGradientGlowFilter.FromXml(xFilter));

            case XConvolutionFilter.TAG_NAME:
                return(XConvolutionFilter.FromXml(xFilter));

            case XColorMatrixFilter.TAG_NAME:
                return(XColorMatrixFilter.FromXml(xFilter));

            case XGradientBevelFilter.TAG_NAME:
                return(XGradientBevelFilter.FromXml(xFilter));

            default:
                throw new NotSupportedException();
            }
        }
Exemplo n.º 2
0
 public XElement Visit(GradientGlowFilter filter, object arg)
 {
     return(XGradientGlowFilter.ToXml(filter));
 }