示例#1
0
 public void Load(SwfStream stream, uint length, byte version)
 {
     CharacterID = stream.ReadUShort();
     Depth = stream.ReadUShort();
     Matrix = stream.ReadMatrix();
     CxForm = stream.TagPosition < length ? stream.ReadCxForm(false) : VGCxForm.Identity;
 }
示例#2
0
        public ButtonRecord(SwfStream stream, Type defButtonType, out bool ok)
        {
            mFlags = stream.ReadByte();
            ok = (mFlags != 0);
            if (!ok)
                return;

            bool hasBlend = (mFlags & 0x20) != 0;
            bool hasFilters = (mFlags & 0x10) != 0;
            CharacterID = stream.ReadUShort();
            CharacterDepth = stream.ReadUShort();
            CharacterMatrix = stream.ReadMatrix();

            if (defButtonType == typeof(Tags.DefineButton2Tag))
            {
                CxForm = stream.ReadCxForm(true);
                Filters = hasFilters ? Filter.ReadFilterList(stream) : new Filter[0];
                Blending = hasBlend ? (BlendMode)stream.ReadByte() : BlendMode.Normal;
            }
            else
            {
                CxForm = VGCxForm.Identity;
                Filters = new Filter[0];
                Blending = BlendMode.Normal;
            }
        }
示例#3
0
        public virtual void Load(SwfStream stream, uint length, byte version)
        {
            CharacterID = stream.ReadUShort();
            Bounds = stream.ReadRectangle();
            Matrix = stream.ReadMatrix();

            if (CharacterID == 347)
            { }

            byte gBits = stream.ReadByte();
            byte aBits = stream.ReadByte();

            List<TextRecord> recs = new List<TextRecord>();
            while (true)
            {
                var rec = new TextRecord(stream, HasAlpha, gBits, aBits);
                if (rec.EndRecord) break;
                recs.Add(rec);
            }
            TextRecords = recs.ToArray();
        }
示例#4
0
 public void Load(SwfStream stream, uint length, byte version)
 {
     mFlags = stream.ReadByte();
     Depth = stream.ReadUShort();
     if (HasCharacter) CharacterID = stream.ReadUShort();
     if (HasMatrix) Matrix = stream.ReadMatrix();
     if (HasCxForm) CxForm = stream.ReadCxForm(true);
     if (HasRatio) Ratio = stream.ReadUShort();
     if (HasName) Name = stream.ReadString();
     if (HasClipDepth) ClipDepth = stream.ReadUShort();
     if (HasActions) Actions = new ClipActions(stream);
 }
示例#5
0
 public void Load(SwfStream stream, uint length, byte version)
 {
     mFlags = stream.ReadUShort();
     Depth = stream.ReadUShort();
     if (HasClassName || (HasImage && HasCharacter)) ClassName = stream.ReadString();
     if (HasCharacter) CharacterID = stream.ReadUShort();
     if (HasMatrix) Matrix = stream.ReadMatrix();
     if (HasCxForm) CxForm = stream.ReadCxForm(true);
     if (HasRatio) Ratio = stream.ReadUShort();
     if (HasName) Name = stream.ReadString();
     if (HasClipDepth) ClipDepth = stream.ReadUShort();
     Filters = HasFilterList ? Filter.ReadFilterList(stream) : new Filter[0];
     if (HasBlendMode) BlendMode = (BlendMode)stream.ReadByte();
     if (HasCacheAsBitmap) BitmapCache = stream.ReadByte();
     if (HasActions) Actions = new ClipActions(stream);
 }