org.faceless.graph.output
Class JimiOutput

java.lang.Object
  extended by org.faceless.graph.output.Output
      extended by org.faceless.graph.output.ImageOutput
          extended by org.faceless.graph.output.JimiOutput

public class JimiOutput
extends ImageOutput

The JimiOutput class is used with the Jimi library, available from http://java.sun.com/products/jimi. Using this library, images can be rendered to PNG, JPEG, TIFF, PCX and many other image formats with ease.


Constructor Summary
JimiOutput(int width, int height, Color color, int numcolors, String mimetype, OutputStream out)
          Create a new JimiOutput of the specified width and height and background color.
JimiOutput(int width, int height, String mimetype, OutputStream out)
          Create a new JimiOutput of the specified width and height.
 
Method Summary
 void render(Graph gr)
          Render the Graph to this Output object.
 
Methods inherited from class org.faceless.graph.output.ImageOutput
canPattern, canRotate, getCanvas, getGraph, getImage, getReducedColorImage, getTextBox, line, poly, setColor, setFontMap, setLineDash, setLineThickness, setMargin, setRenderingHint, text
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JimiOutput

public JimiOutput(int width,
                  int height,
                  String mimetype,
                  OutputStream out)
Create a new JimiOutput of the specified width and height. The image is created with a white background.

Parameters:
width - the width of the image in pixels
height - the height of the image in pixels
mimetype - the mimetype of the output image
out - the OutputStream to render the image to

JimiOutput

public JimiOutput(int width,
                  int height,
                  Color color,
                  int numcolors,
                  String mimetype,
                  OutputStream out)
Create a new JimiOutput of the specified width and height and background color. The image can be reduced to a smaller paletter for image formats that require it, by specifying a non-zero value for the numcolors parameter.

Parameters:
width - the width of the image in pixels
height - the height of the image in pixels
color - the background color of the image
numcolors - The maximum number of colors in the image. A value of zero means no maximum.
mimetype - the mimetype of the output image
out - the OutputStream to render the image to
Method Detail

render

public void render(Graph gr)
            throws IOException
Description copied from class: Output
Render the Graph to this Output object.

Overrides:
render in class ImageOutput
Throws:
IOException


Copyright © 2001-2012 Big Faceless Organization