Esempio n. 1
0
        public void Parse(Stream stream)
        {
            int          count  = stream.ReadByte();
            BinaryReader reader = new BinaryReader(stream);

            if (count == 255)
            {
                count = (int)reader.ReadUInt16();
            }
            for (int i = 0; i < count; ++i)
            {
                SWFFillStyle fill_style = new SWFFillStyle();
                fill_style.Parse(stream);
                fill_style_list.Add(fill_style);
            }
            count = stream.ReadByte();
            if (count == 255)
            {
                count = (int)reader.ReadUInt16();
            }
            for (int i = 0; i < count; ++i)
            {
                SWFLineStyle line_style = new SWFLineStyle();
                line_style.Parse(stream);
                line_style_list.Add(line_style);
            }
            byte c = (byte)stream.ReadByte();

            fill_bits_count = (byte)(c >> 4);
            line_bits_count = (byte)(c & 0x0F);
        }
Esempio n. 2
0
            public Shape(Tags tags, BinaryReader reader, int size)
            {
                tags_ = tags;
                reader.BaseStream.Seek(tags.position, SeekOrigin.Begin);
                shape_id_ = (int)reader.ReadUInt16();
                Parse(reader.BaseStream);

                if (shape_with_style_ != null)
                {
                    SWFFillStyle fill_style = shape_with_style_.GetFillStyle();
                    if (fill_style.IsBitmap())
                    {
                        picture_ref_ = fill_style.GetBitmapRef();
                    }
                }
            }