mxICanvas (JGraph X 2.1.0.7 API Specification)
Date: 2013-07-31

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| JGraph X 2.1.0.7
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.mxgraph.canvas
Interface mxICanvas

All Known Implementing Classes:
  mxBasicCanvas, mxGraphics2DCanvas, mxHtmlCanvas, mxImageCanvas, mxInteractiveCanvas, mxSvgCanvas, mxVmlCanvas

    public interface mxICanvas

Defines the requirements for a canvas that paints the vertices and edges of a graph.

Method Summary
`Object` | `drawCell(mxCellState state)` Draws the given cell.
`Object` | `drawLabel(String text, mxCellState state, boolean html)` Draws the given label.
`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 x, int y)` Sets the translation for the following drawing requests.

Method Detail

### setTranslate

    void setTranslate(int x,
                      int y)

  Sets the translation for the following drawing requests.

### getTranslate

    Point 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

    Object drawCell(mxCellState state)

  Draws the given cell.

  Parameters:
    `state` - State of the cell to be painted.
  Returns:
    Object that represents the cell.

### drawLabel

    Object drawLabel(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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| JGraph X 2.1.0.7
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 2010 Gaudenz Alder. All rights reserved.