Пример #1
0
        public void ParseShapeRecords(SwfReader r)
        {
            bool hasMoreRecords = true;

            while (hasMoreRecords)
            {
                bool typeFlag = r.GetBit();

                if (typeFlag == false)                 // non edge record
                {
                    uint followFlags = r.GetBits(5);
                    if (followFlags == 0)
                    {
                        ShapeRecords.Add(new EndShapeRecord());
                        hasMoreRecords = false;
                    }
                    else
                    {
                        StyleChangedRecord scr = new StyleChangedRecord(r, followFlags, ref fillBits, ref lineBits, ShapeType.Glyph);
                        ShapeRecords.Add(scr);
                    }
                }
                else                 // edge record
                {
                    bool isStraight = r.GetBit();
                    if (isStraight)
                    {
                        StraightEdgeRecord ser = new StraightEdgeRecord(r);
                        ShapeRecords.Add(ser);
                    }
                    else
                    {
                        CurvedEdgeRecord cer = new CurvedEdgeRecord(r);
                        ShapeRecords.Add(cer);
                    }
                }
            }
        }
Пример #2
0
        public void ParseShapeRecords(SwfReader r)
        {
            bool hasMoreRecords = true;
            while (hasMoreRecords)
            {
                bool typeFlag = r.GetBit();

                if (typeFlag == false) // non edge record
                {
                    uint followFlags = r.GetBits(5);
                    if (followFlags == 0)
                    {
                        ShapeRecords.Add(new EndShapeRecord());
                        hasMoreRecords = false;
                    }
                    else
                    {
                        StyleChangedRecord scr = new StyleChangedRecord(r, followFlags, ref fillBits, ref lineBits, ShapeType.Glyph);
                        ShapeRecords.Add(scr);
                    }
                }
                else // edge record
                {
                    bool isStraight = r.GetBit();
                    if (isStraight)
                    {
                        StraightEdgeRecord ser = new StraightEdgeRecord(r);
                        ShapeRecords.Add(ser);
                    }
                    else
                    {
                        CurvedEdgeRecord cer = new CurvedEdgeRecord(r);
                        ShapeRecords.Add(cer);
                    }
                }
            }
        }
Пример #3
0
		private void ParseStyleChangedRecord(StyleChangedRecord tag)
		{
		}