Recurity.Swf.StyleChangeRecord.Write C# (CSharp) 메소드

Write() 공개 메소드

public Write ( Stream output, BitStream bits ) : void
output Stream
bits BitStream
리턴 void
        public override void Write(Stream output, BitStream bits)
        {
            bits.WriteBits(1, 0); //type flag
            bits.WriteBits(1, Convert.ToUInt32(this._stateNewStyles));
            bits.WriteBits(1, Convert.ToUInt32(this._stateLineStyle));
            bits.WriteBits(1, Convert.ToUInt32(this._stateFillStyle1));
            bits.WriteBits(1, Convert.ToUInt32(this._stateFillStyle0));
            bits.WriteBits(1, Convert.ToUInt32(this._stateMoveTo));

            if (this._stateMoveTo)
            {
                bits.WriteBits(5, (Int32)this._moveBits);
                bits.WriteBits((Int32)this._moveBits, (Int32)this._moveDeltaX);
                bits.WriteBits((Int32)this._moveBits, (Int32)this._moveDeltaY);
            }
            if (this._stateFillStyle0)
            {
                bits.WriteBits((Int32)this._numFillBits, (Int32)this._fillStyle0);
            }
            if (this._stateFillStyle1)
            {
                bits.WriteBits((Int32)this._numFillBits, (Int32)this._fillStyle1);
            }
            if (this._stateLineStyle)
            {
                bits.WriteBits((Int32)this._numLineBits, (Int32)this._lineStyle);
            }
            if (this._stateNewStyles && (this._caller.Equals(TagTypes.DefineShape2) || this._caller.Equals(TagTypes.DefineShape3)))
            {
                bits.WriteFlush();
                this._fillStyles.Write(output);
                bits.WriteFlush();
                this._lineStyles.Write(output);
                bits.WriteFlush();
                bits.WriteBits(4, (Int32)this._newNumFillBits);
                bits.WriteBits(4, (Int32)this._newNumLineBits);
            }
        }