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()`
`ImageDisplay(Color bgColor, int margin)`
`ImageDisplay(Color bgColor, int margin, Dimension maxDimension)`
`ImageDisplay(Dimension maxDimension)`

### Method Summary

Methods
`Color` `getBgColor()`
`int` `getMargin()`
`Dimension` `getMaxDimension()`
`BufferedImage` `getScaledInstance(BufferedImage img, int targetWidth, int targetHeight, boolean higherQuality)`
`boolean` `isUseAffineTransform()`
`BufferedImage` `render(Layout<?> layout, int imageType)`
`byte[]` `renderToBytes(Layout<?> layout, String fileType, int imageType)`
`void` `renderToFile(Layout<?> layout, String fileType, int imageType, File file)`
`void` `renderToOutputStream(Layout<?> layout, String fileType, int imageType, OutputStream outputStream)`
`void` `setBgColor(Color bgColor)`
`void` `setMargin(int margin)`
`void` `setMaxDimension(Dimension maxDimension)`
`void` `setUseAffineTransform(boolean useAffineTransform)`

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

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

### Constructor Detail

#### ImageDisplay

    public ImageDisplay()

#### ImageDisplay

    public ImageDisplay(Color bgColor,
                int margin)

#### ImageDisplay

    public ImageDisplay(Color bgColor,
                int margin,
                Dimension maxDimension)

#### ImageDisplay

    public ImageDisplay(Dimension maxDimension)

### Method Detail

#### renderToFile

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

Throws:
  `IOException`
  `LayoutException`

#### renderToOutputStream

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

Throws:
  `IOException`
  `LayoutException`

#### renderToBytes

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

Throws:
  `IOException`
  `LayoutException`

#### render

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

Throws:
  `IOException`
  `LayoutException`

#### getScaledInstance

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

#### getBgColor

    public final Color getBgColor()

#### setBgColor

    public final void setBgColor(Color bgColor)

#### getMargin

    public final int getMargin()

#### setMargin

    public final void setMargin(int margin)

#### getMaxDimension

    public final Dimension getMaxDimension()

#### setMaxDimension

    public final void setMaxDimension(Dimension maxDimension)

#### setUseAffineTransform

    public final void setUseAffineTransform(boolean useAffineTransform)

#### isUseAffineTransform

    public final boolean isUseAffineTransform()