示例#1
0
 public static void AreEqual(GlowFilter expected, GlowFilter actual, string message)
 {
     Assert.AreEqual(expected.BlurX, actual.BlurX, message + ".BlurX");
     Assert.AreEqual(expected.BlurY, actual.BlurY, message + ".BlurY");
     AssertColors.AreEqual(expected.Color, actual.Color, "Color");
     Assert.AreEqual(expected.CompositeSource, actual.CompositeSource);
     Assert.AreEqual(expected.InnerGlow, actual.InnerGlow);
     Assert.AreEqual(expected.Knockout, actual.Knockout);
     Assert.AreEqual(expected.Passes, actual.Passes);
     Assert.AreEqual(expected.Strength, actual.Strength);
 }
示例#2
0
 public static void AreEqual(GlowFilter expected, GlowFilter actual, string message)
 {
     Assert.AreEqual(expected.BlurX, actual.BlurX, message + ".BlurX");
     Assert.AreEqual(expected.BlurY, actual.BlurY, message + ".BlurY");
     AssertColors.AreEqual(expected.Color, actual.Color, "Color");
     Assert.AreEqual(expected.CompositeSource, actual.CompositeSource);
     Assert.AreEqual(expected.InnerGlow, actual.InnerGlow);
     Assert.AreEqual(expected.Knockout, actual.Knockout);
     Assert.AreEqual(expected.Passes, actual.Passes);
     Assert.AreEqual(expected.Strength, actual.Strength);
 }
示例#3
0
 static Filter ReadConcreteFilter(GlowFilter filter, SwfStreamReader reader)
 {
     filter.GlowColor       = SwfColor.Read(reader, true);
     filter.BlurX           = reader.ReadFixedPoint_16_16();
     filter.BlurY           = reader.ReadFixedPoint_16_16();
     filter.Strength        = reader.ReadFixedPoint_8_8();
     filter.InnerGlow       = reader.ReadBit();
     filter.Knockout        = reader.ReadBit();
     filter.CompositeSource = reader.ReadBit();
     filter.Passes          = reader.ReadUnsignedBits(5);
     return(filter);
 }
示例#4
0
 public static XElement ToXml(GlowFilter filter)
 {
     var res = new XElement(TAG_NAME,
         new XAttribute("blurX", CommonFormatter.Format(filter.BlurX)),
         new XAttribute("blurY", CommonFormatter.Format(filter.BlurY)),
         new XAttribute("innerGlow", CommonFormatter.Format(filter.InnerGlow)),
         new XAttribute("knockout", CommonFormatter.Format(filter.Knockout)),
         new XAttribute("passes", filter.Passes),
         new XAttribute("strength", CommonFormatter.Format(filter.Strength)),
         new XElement("color", XColorRGBA.ToXml(filter.Color)),
         new XAttribute("compositeSource", CommonFormatter.Format(filter.CompositeSource))
     );
     return res;
 }
示例#5
0
        public static XElement ToXml(GlowFilter filter)
        {
            var res = new XElement(TAG_NAME,
                                   new XAttribute("blurX", CommonFormatter.Format(filter.BlurX)),
                                   new XAttribute("blurY", CommonFormatter.Format(filter.BlurY)),
                                   new XAttribute("innerGlow", CommonFormatter.Format(filter.InnerGlow)),
                                   new XAttribute("knockout", CommonFormatter.Format(filter.Knockout)),
                                   new XAttribute("passes", filter.Passes),
                                   new XAttribute("strength", CommonFormatter.Format(filter.Strength)),
                                   new XElement("color", XColorRGBA.ToXml(filter.Color)),
                                   new XAttribute("compositeSource", CommonFormatter.Format(filter.CompositeSource))
                                   );

            return(res);
        }
示例#6
0
文件: XFilter.cs 项目: shhadi/SwfLib
 public XElement Visit(GlowFilter filter, object arg)
 {
     return(XGlowFilter.ToXml(filter));
 }
    public RegularKeyAppear()
    {
        var filter_0 = new BlurFilter()
        {
            blurX = 2, blurY = 2
        };
        var filter_1 = new GlowFilter()
        {
            strength = 1.21, color = 16777215, blurX = 13, blurY = 13
        };
        var i43 = new symbol_15()
        {
            scaleX = 0.5, filters = new as3.Array(new object[] {}), scaleY = 0.5
        };

        addChild(i43);        //0
        var i45 = new casesKeysResources_fla.ef1_5()
        {
            x = -0.3, scaleX = 0.46, y = 13.4, scaleY = 0.46, filters = new as3.Array(new object[] { filter_1, filter_0 })
        };

        addChild(i45);        //1
        FrameInfo f;
        var       l = new Frames(15);

        f = l.Add();
        f.Add(i43);
        f.Add(i45);
        f += () => {
            i43.x          = 0;
            i43.scaleX     = 0.5;
            i43.y          = 0;
            i43.scaleY     = 0.5;
            i43.rotation   = 0;
            i43.alpha      = 1;
            i43.filters    = new as3.Array(new object[] {});
            i43.scale9Grid = null;
            i43.visible    = true;
            i45.x          = -0.3;
            i45.scaleX     = 0.46;
            i45.y          = 13.4;
            i45.scaleY     = 0.46;
            i45.rotation   = 0;
            i45.alpha      = 1;
            i45.filters    = new as3.Array(new object[] { filter_1, filter_0 });
            i45.scale9Grid = null;
            i45.visible    = true;
        };
        f = l.Add();
        f.Add(i43);
        f.Add(i45);
        f += () => {
            i43.scaleX = 0.46;
            i43.scaleY = 0.58;
        };
        f = l.Add();
        f.Add(i43);
        f.Add(i45);
        f += () => {
            i43.scaleX = 0.42;
            i43.scaleY = 0.65;
        };
        f = l.Add();
        f.Add(i43);
        f.Add(i45);
        f += () => {
            i43.scaleX = 0.38;
            i43.scaleY = 0.73;
        };
        f = l.Add();
        f.Add(i43);
        f.Add(i45);
        f += () => {
            i43.scaleX = 0.46;
            i43.scaleY = 0.65;
        };
        f = l.Add();
        f.Add(i43);
        f.Add(i45);
        f += () => {
            i43.scaleX = 0.55;
            i43.scaleY = 0.56;
        };
        f = l.Add();
        f.Add(i43);
        f.Add(i45);
        f += () => {
            i43.scaleX = 0.63;
            i43.scaleY = 0.48;
        };
        f = l.Add();
        f.Add(i43);
        f.Add(i45);
        f += () => {
            i43.scaleX = 0.72;
            i43.scaleY = 0.39;
        };
        f = l.Add();
        f.Add(i43);
        f.Add(i45);
        f += () => {
            i43.scaleX = 0.68;
            i43.scaleY = 0.41;
        };
        f = l.Add();
        f.Add(i43);
        f.Add(i45);
        f += () => {
            i43.scaleX = 0.64;
            i43.scaleY = 0.43;
        };
        f = l.Add();
        f.Add(i43);
        f.Add(i45);
        f += () => {
            i43.scaleX = 0.61;
            i43.scaleY = 0.45;
        };
        f = l.Add();
        f.Add(i43);
        f.Add(i45);
        f += () => {
            i43.scaleX = 0.57;
            i43.scaleY = 0.47;
        };
        f = l.Add();
        f.Add(i43);
        f.Add(i45);
        f += () => {
            i43.scaleX = 0.54;
            i43.scaleY = 0.48;
        };
        f = l.Add();
        f.Add(i43);
        f.Add(i45);
        f += () => {
            i43.scaleX = 0.5;
            i43.scaleY = 0.5;
        };
        f = l.Add();
        f.Add(i43);
        setFrames(l);
    }
    public RegularCaseAppear()
    {
        var filter_0 = new BlurFilter()
        {
            blurX = 2, blurY = 2
        };
        var filter_1 = new GlowFilter()
        {
            strength = 1.21, color = 16777215, blurX = 13, blurY = 13
        };
        var i36 = new symbol_10()
        {
            scaleX = 0.5, y = 14.9, scaleY = 0.5, filters = new as3.Array(new object[] {})
        };

        addChild(i36);        //0
        var i38 = new symbol_12()
        {
            scaleX = 0.5, y = -18.4, scaleY = 0.5, filters = new as3.Array(new object[] {})
        };

        addChild(i38);        //1
        var i40 = new casesKeysResources_fla.ef1_5()
        {
            x = -1.4, scaleX = 0.46, y = 6.5, scaleY = 0.46, filters = new as3.Array(new object[] { filter_1, filter_0 })
        };

        addChild(i40);        //2
        FrameInfo f;
        var       l = new Frames(15);

        f = l.Add();
        f.Add(i36);
        f.Add(i38);
        f.Add(i40);
        f += () => {
            i36.x          = 0;
            i36.scaleX     = 0.5;
            i36.y          = 14.9;
            i36.scaleY     = 0.5;
            i36.rotation   = 0;
            i36.alpha      = 1;
            i36.filters    = new as3.Array(new object[] {});
            i36.scale9Grid = null;
            i36.visible    = true;
            i38.x          = 0;
            i38.scaleX     = 0.5;
            i38.y          = -18.4;
            i38.scaleY     = 0.5;
            i38.rotation   = 0;
            i38.alpha      = 1;
            i38.filters    = new as3.Array(new object[] {});
            i38.scale9Grid = null;
            i38.visible    = true;
            i40.x          = -1.4;
            i40.scaleX     = 0.46;
            i40.y          = 6.5;
            i40.scaleY     = 0.46;
            i40.rotation   = 0;
            i40.alpha      = 1;
            i40.filters    = new as3.Array(new object[] { filter_1, filter_0 });
            i40.scale9Grid = null;
            i40.visible    = true;
        };
        f = l.Add();
        f.Add(i36);
        f.Add(i38);
        f.Add(i40);
        f += () => {
            i36.scaleX = 0.49;
            i36.y      = 16.1;
            i36.scaleY = 0.54;
            i38.scaleX = 0.49;
            i38.y      = -19.8;
            i38.scaleY = 0.54;
        };
        f = l.Add();
        f.Add(i36);
        f.Add(i38);
        f.Add(i40);
        f += () => {
            i36.scaleX = 0.47;
            i36.y      = 17.2;
            i36.scaleY = 0.58;
            i38.scaleX = 0.47;
            i38.y      = -21.2;
            i38.scaleY = 0.58;
        };
        f = l.Add();
        f.Add(i36);
        f.Add(i38);
        f.Add(i40);
        f += () => {
            i36.scaleX = 0.46;
            i36.y      = 18.4;
            i36.scaleY = 0.62;
            i38.scaleX = 0.46;
            i38.y      = -22.6;
            i38.scaleY = 0.62;
        };
        f = l.Add();
        f.Add(i36);
        f.Add(i38);
        f.Add(i40);
        f += () => {
            i36.scaleX = 0.49;
            i36.y      = 17.1;
            i36.scaleY = 0.58;
            i38.scaleX = 0.49;
            i38.y      = -21.1;
            i38.scaleY = 0.58;
        };
        f = l.Add();
        f.Add(i36);
        f.Add(i38);
        f.Add(i40);
        f += () => {
            i36.scaleX = 0.52;
            i36.y      = 15.9;
            i36.scaleY = 0.53;
            i38.scaleX = 0.52;
            i38.y      = -19.6;
            i38.scaleY = 0.53;
        };
        f = l.Add();
        f.Add(i36);
        f.Add(i38);
        f.Add(i40);
        f += () => {
            i36.scaleX = 0.55;
            i36.y      = 14.7;
            i36.scaleY = 0.49;
            i38.scaleX = 0.55;
            i38.y      = -18;
            i38.scaleY = 0.49;
        };
        f = l.Add();
        f.Add(i36);
        f.Add(i38);
        f.Add(i40);
        f += () => {
            i36.scaleX = 0.58;
            i36.y      = 13.3;
            i36.scaleY = 0.45;
            i38.scaleX = 0.58;
            i38.y      = -16.4;
            i38.scaleY = 0.45;
        };
        f = l.Add();
        f.Add(i36);
        f.Add(i38);
        f.Add(i40);
        f += () => {
            i36.scaleX = 0.57;
            i36.y      = 13.6;
            i36.scaleY = 0.46;
            i38.scaleX = 0.57;
            i38.y      = -16.8;
            i38.scaleY = 0.46;
        };
        f = l.Add();
        f.Add(i36);
        f.Add(i38);
        f.Add(i40);
        f += () => {
            i36.scaleX = 0.56;
            i36.y      = 13.8;
            i36.scaleY = 0.47;
            i38.scaleX = 0.56;
            i38.y      = -17.1;
            i38.scaleY = 0.47;
        };
        f = l.Add();
        f.Add(i36);
        f.Add(i38);
        f.Add(i40);
        f += () => {
            i36.scaleX = 0.54;
            i36.y      = 14.2;
            i36.scaleY = 0.48;
            i38.scaleX = 0.54;
            i38.y      = -17.4;
            i38.scaleY = 0.48;
        };
        f = l.Add();
        f.Add(i36);
        f.Add(i38);
        f.Add(i40);
        f += () => {
            i36.scaleX = 0.53;
            i36.y      = 14.4;
            i38.scaleX = 0.53;
            i38.y      = -17.7;
        };
        f = l.Add();
        f.Add(i36);
        f.Add(i38);
        f.Add(i40);
        f += () => {
            i36.scaleX = 0.52;
            i36.y      = 14.7;
            i36.scaleY = 0.49;
            i38.scaleX = 0.52;
            i38.y      = -18.1;
            i38.scaleY = 0.49;
        };
        f = l.Add();
        f.Add(i36);
        f.Add(i38);
        f.Add(i40);
        f += () => {
            i36.scaleX = 0.5;
            i36.y      = 14.9;
            i36.scaleY = 0.5;
            i38.scaleX = 0.5;
            i38.y      = -18.4;
            i38.scaleY = 0.5;
        };
        f = l.Add();
        f.Add(i36);
        f.Add(i38);
        setFrames(l);
    }