public Serialize ( |
||
writer | Writer. | |
return | void |
/// <summary> /// Serializes the specified writer. /// </summary> /// <param name="writer">Writer.</param> public void Serialize(XmlWriter writer) { writer.WriteStartElement("ShapeWithStyle"); base.SerializeBinarySize(writer); if (fillStyleArray != null) { fillStyleArray.Serialize(writer); } if (lineStyleArray != null) { lineStyleArray.Serialize(writer); } if (shapes != null) { ShapeWithStyle.NumFillBits = 0; ShapeWithStyle.NumLineBits = 0; if (fillStyleArray != null && fillStyleArray.Count != 0) { ShapeWithStyle.NumFillBits = BufferedBinaryWriter.GetNumBits((uint)fillStyleArray.Count); } if (lineStyleArray != null && lineStyleArray.Count != 0) { ShapeWithStyle.NumLineBits = BufferedBinaryWriter.GetNumBits((uint)lineStyleArray.Count); } shapes.Serialize(writer); ShapeWithStyle.NumFillBits = 0; ShapeWithStyle.NumLineBits = 0; } writer.WriteEndElement(); }
/// <summary> /// Serializes the specified writer. /// </summary> /// <param name="writer">Writer.</param> public override void Serialize(XmlWriter writer) { writer.WriteStartElement("StyleChangeRecord"); base.SerializeBinarySize(writer); writer.WriteElementString("StateNewStyle", HasNewStyle().ToString());; writer.WriteElementString("StateLineStyle", HasLineStyle().ToString()); writer.WriteElementString("StateFillStyle1", HasFillStyle1().ToString()); writer.WriteElementString("StateFillStyle0", HasFillStyle0().ToString()); writer.WriteElementString("StateMoveTo", HasMoveTo().ToString()); if (HasMoveTo()) { writer.WriteElementString("MoveDeltaX", moveDeltaX.ToString()); writer.WriteElementString("MoveDeltaY", moveDeltaY.ToString()); } if (HasFillStyle0()) { writer.WriteElementString("FillStyle0", fillStyle0.ToString()); } if (HasFillStyle1()) { writer.WriteElementString("FillStyle1", fillStyle1.ToString()); } if (HasLineStyle()) { writer.WriteElementString("LineStyle", lineStyle.ToString()); } if (HasNewStyle()) { fillStyles.Serialize(writer); lineStyles.Serialize(writer); ShapeWithStyle.NumFillBits = BufferedBinaryWriter.GetNumBits((uint)fillStyles.Count); ShapeWithStyle.NumLineBits = BufferedBinaryWriter.GetNumBits((uint)lineStyles.Count); writer.WriteElementString("NumFillBits", ShapeWithStyle.NumFillBits.ToString()); writer.WriteElementString("NumLineBits", ShapeWithStyle.NumLineBits.ToString()); } writer.WriteEndElement(); }