Exemplo n.º 1
0
 /// <summary>
 /// Creates a new <see cref="PlaceObjectTag"/> instance.
 /// </summary>
 /// <param name="characterId">Character id.</param>
 /// <param name="depth">Depth.</param>
 /// <param name="matrix">Matrix.</param>
 /// <param name="colorTransform">Color transform.</param>
 public PlaceObjectTag(ushort characterId, ushort depth, Matrix matrix, CXForm colorTransform)
 {
     this.characterId    = characterId;
     this.depth          = depth;
     this.matrix         = matrix;
     this.colorTransform = colorTransform;
     this._tagCode       = (int)TagCodeEnum.PlaceObject;
 }
Exemplo n.º 2
0
        /// <summary>
        /// see <see cref="SwfDotNet.IO.Tags.BaseTag">base class</see>
        /// </summary>
        public override void ReadData(byte version, BufferedBinaryReader binaryReader)
        {
            RecordHeader rh = new RecordHeader();

            rh.ReadData(binaryReader);

            buttonId             = binaryReader.ReadUInt16();
            buttonColorTransform = new CXForm();
            buttonColorTransform.ReadData(binaryReader);
        }
Exemplo n.º 3
0
        /// <summary>
        /// see <see cref="SwfDotNet.IO.Tags.BaseTag">base class</see>
        /// </summary>
        public override void ReadData(byte version, BufferedBinaryReader binaryReader)
        {
            RecordHeader rh = new RecordHeader();

            rh.ReadData(binaryReader);

            long initPos = binaryReader.BaseStream.Position;

            characterId = binaryReader.ReadUInt16();
            depth       = binaryReader.ReadUInt16();
            matrix      = new Matrix();
            matrix.ReadData(binaryReader);

            long pos = binaryReader.BaseStream.Position - initPos;

            if (pos < rh.TagLength)
            {
                colorTransform = new CXForm();
                colorTransform.ReadData(binaryReader);
            }
        }
Exemplo n.º 4
0
 /// <summary>
 /// Creates a new <see cref="DefineButtonCxFormTag"/> instance.
 /// </summary>
 /// <param name="buttonId">Button id.</param>
 /// <param name="buttonColorTransform">Button color transform.</param>
 public DefineButtonCxFormTag(ushort buttonId, CXForm buttonColorTransform)
 {
     this.buttonId             = buttonId;
     this.buttonColorTransform = buttonColorTransform;
     this._tagCode             = (int)TagCodeEnum.DefineButtonCxForm;
 }