コード例 #1
0
        private void Write(ISwfStreamWriter writer, IShapeRecord record, bool allowBigArray, ref uint fillBitsCount, ref uint lineBitsCount)
        {
            var ctx = new ShapeRecordWriteContext {
                FillStyleBits = fillBitsCount,
                LineStyleBits = lineBitsCount,
                AllowBigArray = allowBigArray,
                Writer        = writer
            };

            ctx           = record.AcceptVisitor(this, ctx);
            fillBitsCount = ctx.FillStyleBits;
            lineBitsCount = ctx.LineStyleBits;
        }
コード例 #2
0
ファイル: AssertShape.cs プロジェクト: shhadi/SwfLib
 public static void AreEqual(IShapeRecord expected, IShapeRecord actual, string message)
 {
     if (expected is StyleChangeShapeRecord && actual is StyleChangeShapeRecord)
     {
         AreEqual((StyleChangeShapeRecord)expected, (StyleChangeShapeRecord)actual, message);
     }
     else if (expected is StraightEdgeShapeRecord && actual is StraightEdgeShapeRecord)
     {
         AreEqual((StraightEdgeShapeRecord)expected, (StraightEdgeShapeRecord)actual, message);
     }
     else if (expected is EndShapeRecord && actual is EndShapeRecord)
     {
         AreEqual((EndShapeRecord)expected, (EndShapeRecord)actual, message);
     }
     else
     {
         throw new NotSupportedException(string.Format("{0}: Can't compare {1} and {2}", message,
                                                       expected.GetType(), actual.GetType()));
     }
 }
コード例 #3
0
 public static XElement ToXml(IShapeRecord shapeRecord)
 {
     return(shapeRecord.AcceptVisitor(_writer, null));
 }