public WriteTo ( |
||
binaryWriter | Binary writer. | |
Résultat | void |
/// <summary> /// Writes to a binary writer. /// </summary> /// <param name="writer">Writer.</param> public void WriteTo(BufferedBinaryWriter writer) { writer.Write(this.fillStyleType); if (fillStyleType == (byte)FillStyleType.SolidFill && rgbColor != null) { rgbColor.WriteTo(writer); } if (fillStyleType == (byte)FillStyleType.RadialGradientFill || fillStyleType == (byte)FillStyleType.LinearGradientFill) { if (gradientMatrix != null) { gradientMatrix.WriteTo(writer); } if (gradient != null) { gradient.WriteTo(writer); } } if (fillStyleType == (byte)FillStyleType.RepeatingBitmapFill || fillStyleType == (byte)FillStyleType.ClippedBitmapFill || fillStyleType == (byte)FillStyleType.NonSmoothedClippedBitmap || fillStyleType == (byte)FillStyleType.NonSmoothedRepeatingBitmap) { writer.Write(this.bitmapId); if (this.bitmapMatrix != null) { this.bitmapMatrix.WriteTo(writer); } } }
/// <summary> /// Writes to a binary writer. /// </summary> /// <param name="writer">Writer.</param> public void WriteTo(BufferedBinaryWriter writer) { writer.Write(this.fillStyleType); if (fillStyleType == (byte)MorphFillStyleType.SolidFill) { if (startColor != null) { this.startColor.WriteTo(writer); } if (endColor != null) { this.endColor.WriteTo(writer); } } if (fillStyleType == (byte)MorphFillStyleType.LinearGradientFill || fillStyleType == (byte)MorphFillStyleType.RadialGradientFill) { if (startGradientMatrix != null) { startGradientMatrix.WriteTo(writer); } if (endGradientMatrix != null) { endGradientMatrix.WriteTo(writer); } if (gradient != null) { gradient.WriteTo(writer); } } if (fillStyleType == (byte)MorphFillStyleType.LinearGradientFill || fillStyleType == (byte)MorphFillStyleType.RadialGradientFill || fillStyleType == (byte)MorphFillStyleType.RadialGradientFill || fillStyleType == (byte)MorphFillStyleType.RadialGradientFill) { writer.Write(this.bitmapId); if (startBitmapMatrix != null) { startBitmapMatrix.WriteTo(writer); } if (endBitmapMatrix != null) { endBitmapMatrix.WriteTo(writer); } } }
/// <summary> /// Writes to a binary writer. /// </summary> /// <param name="writer">Writer.</param> /// <param name="buttonType">Button type.</param> public void WriteTo(BufferedBinaryWriter writer, TagCodeEnum buttonType) { writer.WriteUBits(0, 4); writer.WriteBoolean(buttonStateHitTest); writer.WriteBoolean(buttonStateDown); writer.WriteBoolean(buttonStateOver); writer.WriteBoolean(buttonStateUp); writer.Write(this.characterId); writer.Write(this.placeDepth); if (placeMatrix != null) { placeMatrix.WriteTo(writer); } if (colorTransform != null && buttonType == TagCodeEnum.DefineButton2) { colorTransform.WriteTo(writer); } }