org.bootchart.renderer

## Class ImageRenderer

- java.lang.Object
- - org.bootchart.renderer.Renderer
  - - org.bootchart.renderer.ImageRenderer

- Direct Known Subclasses:
    EPSRenderer, PNGRenderer

      public abstract class ImageRenderer
      extends Renderer

  ImageRenderer renders the boot chart as a Java 2D `BufferedImage`. Subclasses may then encode the image in different formats (e.g. PNG or EPS).

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected boolean` | `allowAlpha` Whether to allow usage of transparency.
    `protected java.awt.Graphics` | `g`
    `protected java.awt.image.BufferedImage` | `img`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ImageRenderer()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract java.lang.String` | `getFileSuffix()` Returns the file suffix to use for the rendered image.
    `void` | `render(java.util.Properties headers, BootStats bootStats, java.io.OutputStream os)` Render the chart.

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

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

- - ### Field Detail

    - #### g

          protected java.awt.Graphics g

    - #### img

          protected java.awt.image.BufferedImage img

    - #### allowAlpha

          protected boolean allowAlpha

      Whether to allow usage of transparency. Certain renderers (e.g. EPS) will produce better results if the colors aren't transparent.

  - ### Constructor Detail

    - #### ImageRenderer

          public ImageRenderer()

  - ### Method Detail

    - #### render

          public void render(java.util.Properties headers,
                             BootStats bootStats,
                             java.io.OutputStream os)
                      throws java.io.IOException

      Render the chart.
      Specified by:
        `render` in class `Renderer`
      Parameters:
        `headers` - header properties to include in the title banner
        `bootStats` - boot statistics
        `os` - the output stream to write t
      Throws:
        `java.io.IOException` - if an I/O error occurs

    - #### getFileSuffix

          public abstract java.lang.String getFileSuffix()

      Description copied from class: `Renderer`
      Returns the file suffix to use for the rendered image.
      Specified by:
        `getFileSuffix` in class `Renderer`
      Returns:
        file suffix