net.dontdrinkandroot.visualization.display

## Class ImageDisplay

- java.lang.Object
- - net.dontdrinkandroot.visualization.display.ImageDisplay

All Implemented Interfaces:
  Display

    public class ImageDisplay
    extends Object
    implements Display

### Constructor Summary

Constructors
Constructor and Description
`ImageDisplay()`

### Method Summary

Methods
`Color` `getBgColor()`
`String` `getFileType()`
`int` `getImageType()`
`int` `getMargin()`
`Dimension` `getMaxDimension()`
`BufferedImage` `getScaledInstance(BufferedImage img, int targetWidth, int targetHeight, boolean higherQuality)`
`boolean` `isUseAffineTransform()`
`protected BufferedImage` `postProcessImage(BufferedImage finalImage)` Apply post processing to the rendered and scaled image.
`BufferedImage` `render(Layout<?> layout)`
`byte[]` `renderToBytes(Layout<?> layout)`
`void` `renderToFile(Layout<?> layout, File file)`
`void` `renderToOutputStream(Layout<?> layout, OutputStream outputStream)`
`ImageDisplay` `setBgColor(Color bgColor)`
`ImageDisplay` `setFileType(String fileType)`
`ImageDisplay` `setImageType(int imageType)`
`ImageDisplay` `setMargin(int margin)`
`ImageDisplay` `setMaxDimension(Dimension maxDimension)`
`ImageDisplay` `setUseAffineTransform(boolean useAffineTransform)` Indicate if the scaling should be done by an affine transformation instead of multi sample scaling.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ImageDisplay

    public ImageDisplay()

### Method Detail

#### renderToFile

    public void renderToFile(Layout<?> layout,
                    File file)
                      throws IOException,
                             LayoutException

Specified by:
  `renderToFile` in interface `Display`
Throws:
  `IOException`
  `LayoutException`

#### renderToOutputStream

    public void renderToOutputStream(Layout<?> layout,
                            OutputStream outputStream)
                              throws IOException,
                                     LayoutException

Specified by:
  `renderToOutputStream` in interface `Display`
Throws:
  `IOException`
  `LayoutException`

#### renderToBytes

    public byte[] renderToBytes(Layout<?> layout)
                         throws IOException,
                                LayoutException

Specified by:
  `renderToBytes` in interface `Display`
Throws:
  `IOException`
  `LayoutException`

#### render

    public BufferedImage render(Layout<?> layout)
                         throws IOException,
                                LayoutException

Throws:
  `IOException`
  `LayoutException`

#### postProcessImage

    protected BufferedImage postProcessImage(BufferedImage finalImage)

Apply post processing to the rendered and scaled image.

#### getScaledInstance

    public BufferedImage getScaledInstance(BufferedImage img,
                                  int targetWidth,
                                  int targetHeight,
                                  boolean higherQuality)

#### getBgColor

    public final Color getBgColor()

#### setBgColor

    public final ImageDisplay setBgColor(Color bgColor)

#### getMargin

    public final int getMargin()

#### setMargin

    public final ImageDisplay setMargin(int margin)

#### getMaxDimension

    public final Dimension getMaxDimension()

#### setMaxDimension

    public final ImageDisplay setMaxDimension(Dimension maxDimension)

#### setUseAffineTransform

    public final ImageDisplay setUseAffineTransform(boolean useAffineTransform)

Indicate if the scaling should be done by an affine transformation instead of multi sample scaling.

Returns:

#### isUseAffineTransform

    public final boolean isUseAffineTransform()

#### getImageType

    public int getImageType()

#### setImageType

    public ImageDisplay setImageType(int imageType)

#### getFileType

    public String getFileType()

#### setFileType

    public ImageDisplay setFileType(String fileType)