org.eclipse.graphiti.ui.saveasimage

## Interface ISaveAsImageConfiguration

All Known Implementing Classes:
  ExportDiagramDialog

    public interface ISaveAsImageConfiguration

This interface defines a save as image configuration container, that is used for saving a diagram as an image. The container itself is also capable of providing an image for the figure to save as an image.

Since:
  0.10

### Field Summary

Fields
`static int` `OK` The return code for `configure()` that indicates a successful configuration process.

### Method Summary

All Methods Instance Methods Abstract Methods
`void` `addExporters(java.util.Map<java.lang.String,java.lang.Boolean> diagramExporterTypes)` Should add the given exporters to an internal list.
`int` `configure()` Does the actual configuration.
`org.eclipse.draw2d.IFigure` `getFigure()` Returns the figure to be saved as an image.
`java.lang.String` `getFileExtension()` Returns the file extension to use.
`java.lang.String` `getFormattedFileExtension()` Returns the selected file extension formatted in a standard way, e.g.
`int` `getImageFormat()` Returns the image format as defined by the SWT.IMAGE_* constants like `SWT.IMAGE_BMP`.
`double` `getImageScaleFactor()` Retunrs the scale factor to be used in the saved image.
`Image` `getScaledImage()` Returns the image in the final scaled version that fits the zooom factor etc.

### Field Detail

#### OK

    static final int OK

The return code for `configure()` that indicates a successful configuration process.

See Also:
  Constant Field Values

### Method Detail

#### addExporters

    void addExporters(java.util.Map<java.lang.String,java.lang.Boolean> diagramExporterTypes)

Should add the given exporters to an internal list. Clients may use this list to let users select in an UI from the exporters or programmatically decide which one to use.

Parameters:
  `diagramExporterTypes` - A `Map` holding all exporters.

#### configure

    int configure()

Does the actual configuration. May bring up a UI.

Returns:

#### getFormattedFileExtension

    java.lang.String getFormattedFileExtension()

Returns the selected file extension formatted in a standard way, e.g. converted to lower case.

Returns:
  A string holding the file extension

#### getScaledImage

    Image getScaledImage()

Returns the image in the final scaled version that fits the zooom factor etc. the user (or the configure coding) defined.

Returns:
  An `Image` containing what shall be saved.

#### getFileExtension

    java.lang.String getFileExtension()

Returns the file extension to use.

Returns:
  A string holding the file extension

#### getImageFormat

    int getImageFormat()

Returns the image format as defined by the SWT.IMAGE_* constants like `SWT.IMAGE_BMP`.

Returns:
  An integer defining the format

#### getFigure

    org.eclipse.draw2d.IFigure getFigure()

Returns the figure to be saved as an image.

Returns:
  The figure to be saved as an image

#### getImageScaleFactor

    double getImageScaleFactor()

Retunrs the scale factor to be used in the saved image.

Returns:
  A double value defining the scale factor.