Ejemplo n.º 1
0
 protected override void WriteBody(SwfWriter writer, SwfTagCode shapeType)
 {
     writer.WriteUInt16(BitmapId);
     writer.WriteMatrix(Matrix);
     if (SwfShape.IsMorph(shapeType))
     {
         writer.WriteMatrix(EndMatrix);
     }
 }
Ejemplo n.º 2
0
 protected override void DumpBody(XmlWriter writer, SwfTagCode shapeType)
 {
     writer.WriteElementString("bmp-id", BitmapId.ToString());
     writer.WriteElementString("matrix", Matrix.GetMatrixString());
     if (SwfShape.IsMorph(shapeType))
     {
         writer.WriteElementString("end-matrix", EndMatrix.GetMatrixString());
     }
 }
Ejemplo n.º 3
0
 protected override void DumpBody(XmlWriter writer, SwfTagCode shapeType)
 {
     writer.WriteElementString("matrix", Matrix.GetMatrixString());
     if (SwfShape.IsMorph(shapeType))
     {
         writer.WriteElementString("end-matrix", EndMatrix.GetMatrixString());
     }
     Gradient.Dump(writer, shapeType);
 }
Ejemplo n.º 4
0
 public override void Read(SwfReader reader, SwfTagCode shapeType)
 {
     BitmapId = reader.ReadUInt16();
     Matrix   = reader.ReadMatrix();
     if (SwfShape.IsMorph(shapeType))
     {
         EndMatrix = reader.ReadMatrix();
     }
 }
Ejemplo n.º 5
0
        public override void Read(SwfReader reader, SwfTagCode shapeType)
        {
            bool hasAlpha = SwfShape.HasAlpha(shapeType);

            Color = hasAlpha ? reader.ReadRGBA() : reader.ReadRGB();
            if (SwfShape.IsMorph(shapeType))
            {
                EndColor = reader.ReadRGBA();
            }
        }
Ejemplo n.º 6
0
 protected override void WriteBody(SwfWriter writer, SwfTagCode shapeType)
 {
     if (_kind != SwfFillKind.FocalGradient)
     {
         writer.WriteMatrix(Matrix);
         if (SwfShape.IsMorph(shapeType))
         {
             writer.WriteMatrix(EndMatrix);
         }
     }
     Gradient.Write(writer, shapeType);
 }
Ejemplo n.º 7
0
 protected override void DumpBody(XmlWriter writer, SwfTagCode shapeType)
 {
     if (SwfShape.IsMorph(shapeType))
     {
         writer.WriteAttributeString("begin-color", Color.ToHtmlHex());
         writer.WriteAttributeString("end-color", EndColor.ToHtmlHex());
     }
     else
     {
         bool hasAlpha = SwfShape.HasAlpha(shapeType);
         writer.WriteAttributeString("color", Color.ToHtmlHex(hasAlpha));
     }
 }
Ejemplo n.º 8
0
 public override void Read(SwfReader reader, SwfTagCode shapeType)
 {
     if (_kind != SwfFillKind.FocalGradient)
     {
         Matrix = reader.ReadMatrix();
         if (SwfShape.IsMorph(shapeType))
         {
             EndMatrix = reader.ReadMatrix();
         }
         Gradient = new SwfGradient();
         Gradient.Read(reader, shapeType);
     }
     else
     {
         Gradient = new SwfFocalGradient();
         Gradient.Read(reader, shapeType);
     }
 }
Ejemplo n.º 9
0
        protected override void WriteBody(SwfWriter writer, SwfTagCode shapeType)
        {
            bool hasAlpha = SwfShape.HasAlpha(shapeType);

            if (hasAlpha)
            {
                writer.WriteRGBA(Color);
            }
            else
            {
                writer.WriteRGB(Color);
            }

            if (SwfShape.IsMorph(shapeType))
            {
                writer.WriteRGBA(EndColor);
            }
        }