public class mxImageCanvas extends Object implements mxICanvas
BufferedImage image = mxCellRenderer.createBufferedImage(graph, cells, 1, Color.white, true, null, canvas);| Modifier and Type | Field and Description |
|---|---|
protected mxGraphics2DCanvas |
canvas |
protected BufferedImage |
image |
protected Graphics2D |
previousGraphics |
| Constructor and Description |
|---|
mxImageCanvas(mxGraphics2DCanvas canvas,
int width,
int height,
Color background,
boolean antiAlias) |
| Modifier and Type | Method and Description |
|---|---|
BufferedImage |
destroy() |
Object |
drawCell(mxCellState state)
Draws the given cell.
|
Object |
drawLabel(String label,
mxCellState state,
boolean html)
Draws the given label.
|
mxGraphics2DCanvas |
getGraphicsCanvas() |
BufferedImage |
getImage() |
double |
getScale()
Returns the scale.
|
Point |
getTranslate()
Returns the current translation.
|
void |
setScale(double scale)
Sets the scale for the following drawing requests.
|
void |
setTranslate(int dx,
int dy)
Sets the translation for the following drawing requests.
|
protected mxGraphics2DCanvas canvas
protected Graphics2D previousGraphics
protected BufferedImage image
public mxImageCanvas(mxGraphics2DCanvas canvas, int width, int height, Color background, boolean antiAlias)
public mxGraphics2DCanvas getGraphicsCanvas()
public BufferedImage getImage()
public Object drawCell(mxCellState state)
mxICanvaspublic Object drawLabel(String label, mxCellState state, boolean html)
mxICanvaspublic double getScale()
mxICanvaspublic Point getTranslate()
mxICanvasgetTranslate in interface mxICanvaspublic void setScale(double scale)
mxICanvaspublic void setTranslate(int dx,
int dy)
mxICanvassetTranslate in interface mxICanvaspublic BufferedImage destroy()
Copyright (c) 2010 Gaudenz Alder. All rights reserved.