示例#1
0
文件: XFilter.cs 项目: shhadi/SwfLib
        /// <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();
            }
        }
示例#2
0
文件: XFilter.cs 项目: shhadi/SwfLib
 public XElement Visit(DropShadowFilter filter, object arg)
 {
     return(XDropShadowFilter.ToXml(filter));
 }