示例#1
0
 protected override void DumpBody(XmlWriter writer, SwfTagCode shapeType)
 {
     writer.WriteAttributeString("cdx", ControlDeltaX.ToString());
     writer.WriteAttributeString("cdy", ControlDeltaY.ToString());
     writer.WriteAttributeString("adx", AnchorDeltaX.ToString());
     writer.WriteAttributeString("ady", AnchorDeltaY.ToString());
 }
示例#2
0
        public override void Write(SwfWriter writer, SwfTagCode shapeType)
        {
            writer.WriteBit(true);  //edge flag
            writer.WriteBit(false); //strait flag

            int cx = ControlDeltaX.ToTwips();
            int cy = ControlDeltaY.ToTwips();
            int ax = AnchorDeltaX.ToTwips();
            int ay = AnchorDeltaY.ToTwips();

            int bits = _bits;

            if (!_read)
            {
                bits = Math.Max(cx.GetMinBits(cy, ax, ay), 2);
            }

            writer.WriteUB((uint)(bits - 2), 4);
            writer.WriteSB(cx, bits);
            writer.WriteSB(cy, bits);
            writer.WriteSB(ax, bits);
            writer.WriteSB(ay, bits);
        }