Interface OutputFormat

All Known Implementing Classes:
BitmapExportOutputFormat, SimpleXmlWriter, XmlEncoderOutputFormat

public interface OutputFormat
OutputFormat.
Author:
Werner Randelshofer
  • Method Details

    • setOptions

      void setOptions(ImmutableMap<Key<?>,Object> newValue)
    • getOptions

      ImmutableMap<Key<?>,Object> getOptions()
    • write

      default void write(URI uri, Drawing drawing, WorkState<Void> workState) throws IOException
      Writes a Drawing into the resource identified by the given URI.
      Parameters:
      uri - The resource identifier
      drawing - The drawing.
      workState - for progress monitoring and cancelling the operation
      Throws:
      IOException - if an IO error occurs
    • write

      default void write(Path file, Drawing drawing, WorkState<Void> workState) throws IOException
      Writes the drawing to the specified file. This method ensures that all figures of the drawing are visible on the image.
      Parameters:
      file - the file
      drawing - the drawing
      workState - for progress monitoring and cancelling the operation
      Throws:
      IOException - if an IO error occurs
    • write

      void write(OutputStream out, @Nullable URI documentHome, Drawing drawing, WorkState<Void> workState) throws IOException
      Writes a Drawing into an output stream.
      Parameters:
      out - The output stream.
      documentHome - Document home URI for creating relative URIs in the document if this URI is null, all URIs in the document will be absolute
      drawing - The drawing.
      workState - for progress monitoring and cancelling the operation
      Throws:
      IOException - if an IO error occurs