/// <summary> /// /// </summary> /// <param name="input"></param> public override void Parse( Stream input ) { _GlowColor = new Rgba( this.Version ); _GlowColor.Parse( input ); BinaryReader br = new BinaryReader( input ); _BlurX = br.ReadUInt32(); _BlurY = br.ReadUInt32(); _Strength = br.ReadUInt16(); BitStream bits = new BitStream( input ); _InnerGlow = ( 0 != bits.GetBits( 1 ) ); _KnockOut = ( 0 != bits.GetBits( 1 ) ); _CompositeSource = ( 0 != bits.GetBits( 1 ) ); _Passes = ( byte )bits.GetBits( 5 ); }
/// <summary> /// /// </summary> /// <param name="input"></param> public override void Parse( Stream input ) { BinaryReader br = new BinaryReader( input ); _numColors = br.ReadByte(); _GradientColors = new List<Rgba>(); for ( int i = 0; i < _numColors; i++ ) { Rgba entry = new Rgba( this.Version ); entry.Parse( input ); _GradientColors.Add( entry ); } _GradientRatio = new List<byte>(); for ( int i = 0; i < _numColors; i++ ) { byte entry2 = br.ReadByte(); _GradientRatio.Add( entry2 ); } _BlurX = br.ReadUInt32(); _BlurY = br.ReadUInt32(); _Angle = br.ReadUInt32(); _Distance = br.ReadUInt32(); _Strength = br.ReadUInt16(); BitStream bits = new BitStream( input ); _InnerShadow = ( 0 != bits.GetBits( 1 ) ); _KnockOut = ( 0 != bits.GetBits( 1 ) ); _CompositeSource = ( 0 != bits.GetBits( 1 ) ); if ( !_CompositeSource ) { throw new SwfFormatException( "GradientGlowFilter with CompositeSource false" ); } _OnTop = ( 0 != bits.GetBits( 1 ) ); _Passes = ( byte )bits.GetBits( 4 ); }
/// <summary> /// /// </summary> /// <param name="input"></param> public override void Parse( Stream input ) { BinaryReader br = new BinaryReader( input ); _MatrixX = br.ReadByte(); _MatrixY = br.ReadByte(); _DivisorFLOAT = br.ReadUInt32(); _BiasFLOAT = br.ReadUInt32(); _MatrixValues = new List<uint>(); for ( int i = 0; i < ( _MatrixX * _MatrixY ); i++ ) { UInt32 a = br.ReadUInt32(); _MatrixValues.Add( a ); } _DefaultColor = new Rgba( this.Version ); _DefaultColor.Parse( input ); BitStream bits = new BitStream( input ); uint reserved = bits.GetBits( 6 ); if ( 0 != reserved ) { throw new SwfFormatException( "ConvolutionFilter uses reserved bits" ); } _Clamp = ( 0 != bits.GetBits( 1 ) ); _PreserveAlpha = ( 0 != bits.GetBits( 1 ) ); }
/// <summary> /// /// </summary> /// <param name="input"></param> public override void Parse( Stream input ) { BinaryReader br = new BinaryReader( input ); _ShadowColor = new Rgba( this.Version ); _ShadowColor.Parse( input ); _HighlightColor = new Rgba( this.Version ); _HighlightColor.Parse( input ); _BlurX = br.ReadUInt32(); _BlurY = br.ReadUInt32(); _Angle = br.ReadUInt32(); _Distance = br.ReadUInt32(); _Strength = br.ReadUInt16(); BitStream bits = new BitStream( input ); _InnerShadow = ( 0 != bits.GetBits( 1 ) ); _KnockOut = ( 0 != bits.GetBits( 1 ) ); _CompositeSource = ( 0 != bits.GetBits( 1 ) ); if ( !_CompositeSource ) { throw new SwfFormatException( "BevelFilter with CompositeSource false" ); } _OnTop = ( 0 != bits.GetBits( 1 ) ); _Passes = ( byte )bits.GetBits( 4 ); }