Package com.mxgraph.canvas
Interface mxICanvas
-
- All Known Implementing Classes:
mxBasicCanvas,mxGraphics2DCanvas,mxHtmlCanvas,mxImageCanvas,mxInteractiveCanvas,mxSvgCanvas,mxVmlCanvas
public interface mxICanvasDefines the requirements for a canvas that paints the vertices and edges of a graph.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.ObjectdrawCell(mxCellState state)Draws the given cell.java.lang.ObjectdrawLabel(java.lang.String text, mxCellState state, boolean html)Draws the given label.doublegetScale()Returns the scale.mxPointgetTranslate()Returns the current translation.voidsetScale(double scale)Sets the scale for the following drawing requests.voidsetTranslate(double x, double y)Sets the translation for the following drawing requests.
-
-
-
Method Detail
-
setTranslate
void setTranslate(double x, double y)Sets the translation for the following drawing requests.
-
getTranslate
mxPoint getTranslate()
Returns the current translation.- Returns:
- Returns the current translation.
-
setScale
void setScale(double scale)
Sets the scale for the following drawing requests.
-
getScale
double getScale()
Returns the scale.
-
drawCell
java.lang.Object drawCell(mxCellState state)
Draws the given cell.- Parameters:
state- State of the cell to be painted.- Returns:
- Object that represents the cell.
-
drawLabel
java.lang.Object drawLabel(java.lang.String text, mxCellState state, boolean html)Draws the given label.- Parameters:
text- String that represents the label.state- State of the cell whose label is to be painted.html- Specifies if the label contains HTML markup.- Returns:
- Object that represents the label.
-
-