public class mxImageCanvas extends java.lang.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 java.awt.image.BufferedImage |
image |
protected java.awt.Graphics2D |
previousGraphics |
Constructor and Description |
---|
mxImageCanvas(mxGraphics2DCanvas canvas,
int width,
int height,
java.awt.Color background,
boolean antiAlias) |
mxImageCanvas(mxGraphics2DCanvas canvas,
int width,
int height,
java.awt.Color background,
boolean antiAlias,
boolean textAntiAlias) |
Modifier and Type | Method and Description |
---|---|
java.awt.image.BufferedImage |
destroy() |
java.lang.Object |
drawCell(mxCellState state)
Draws the given cell.
|
java.lang.Object |
drawLabel(java.lang.String label,
mxCellState state,
boolean html)
Draws the given label.
|
mxGraphics2DCanvas |
getGraphicsCanvas() |
java.awt.image.BufferedImage |
getImage() |
double |
getScale()
Returns the scale.
|
mxPoint |
getTranslate()
Returns the current translation.
|
void |
setScale(double scale)
Sets the scale for the following drawing requests.
|
void |
setTranslate(double dx,
double dy)
Sets the translation for the following drawing requests.
|
protected mxGraphics2DCanvas canvas
protected java.awt.Graphics2D previousGraphics
protected java.awt.image.BufferedImage image
public mxImageCanvas(mxGraphics2DCanvas canvas, int width, int height, java.awt.Color background, boolean antiAlias)
public mxImageCanvas(mxGraphics2DCanvas canvas, int width, int height, java.awt.Color background, boolean antiAlias, boolean textAntiAlias)
public mxGraphics2DCanvas getGraphicsCanvas()
public java.awt.image.BufferedImage getImage()
public java.lang.Object drawCell(mxCellState state)
mxICanvas
public java.lang.Object drawLabel(java.lang.String label, mxCellState state, boolean html)
mxICanvas
public double getScale()
mxICanvas
public mxPoint getTranslate()
mxICanvas
getTranslate
in interface mxICanvas
public void setScale(double scale)
mxICanvas
public void setTranslate(double dx, double dy)
mxICanvas
setTranslate
in interface mxICanvas
public java.awt.image.BufferedImage destroy()
Copyright (c) 2010-2017 Gaudenz Alder, JGraph Ltd. All rights reserved.