public class CanvasUtils extends java.lang.Object
CanvasGraphics2D
implementation.Modifier and Type | Method and Description |
---|---|
static void |
writeToHTML(java.io.File f,
java.lang.String title,
java.lang.String canvasID,
int width,
int height,
java.lang.String canvasScript)
Writes HTML output containing a script (usually generated by
CanvasGraphics2D ) to the specified file. |
public static void writeToHTML(java.io.File f, java.lang.String title, java.lang.String canvasID, int width, int height, java.lang.String canvasScript) throws java.io.IOException
CanvasGraphics2D
) to the specified file. This method is used
in the demo applications.f
- the file.title
- the title for the HTML.canvasID
- the canvas ID.width
- the canvas width.height
- the canvas height.canvasScript
- the canvas script.java.io.IOException
- if there is an IO error.