public class FlashOutput extends Output
Graph graph = makeMyGraph(); FlashOutput out = new FlashOutput(100, 100); graph.draw(out); out.writeFlash(new FileOutputStream("Graph.swf"));
|Constructor and Description|
Creates a new Flash movie with the default white background
Creates a new Flash movie with the specified background color
|Modifier and Type||Method and Description|
Set the paint in the output
Set the level of detail to draw.
Define a font for use in the movie.
Write the completed SWF file to the specified OutputStream.
public FlashOutput(int width, int height)
width- the width of the image in user units
height- the height of the image in user units
public FlashOutput(int width, int height, Color background)
width- the width of the image
height- the height of the image
background- the background color of the movie
Define a font for use in the movie. This method can be used to define non-standard fonts for use in Graphs. Without calling this method the "Default" font is available and set to a sans-serif font. Additionally since 2.0.4 any fonts available to the Java process may be referenced by name without having to call this method.
For example, to use a font called "myfont" in a style:
name- the name of the font, as passed to
TextStyle.setFont(java.lang.String, double). A name of "Default" will override the default font. The name is case-insensitive.
font- the Font to use
protected void doSetPaint(Paint paint)
paint- the Paint to use for drawing, text etc.
public void writeFlash(OutputStream out) throws IOException
out- the OutputStream to write the movie to
public void setDetailLevel(int detailLevel)
detailLevel- the level of detail to display. The default value is 30, and lower values give more detail, with 0 meaning "display everything"
Copyright © 2001-2016 Big Faceless Organization