JGraph X 1.3.0.0

## 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
`java.lang.Object` `drawEdge(java.util.List<mxPoint> pts, java.util.Map<java.lang.String,java.lang.Object> style)` Draws the given edge.
`java.lang.Object` `drawLabel(java.lang.String label, int x, int y, int width, int height, java.util.Map<java.lang.String,java.lang.Object> style, boolean isHtml)` Draws the given label.
`java.lang.Object` `drawVertex(int x, int y, int width, int height, java.util.Map<java.lang.String,java.lang.Object> style)` Draws the given vertex.
`double` `getScale()` Returns the scale.
`java.awt.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

    java.awt.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.

### drawVertex

    java.lang.Object drawVertex(int x,
                                int y,
                                int width,
                                int height,
                                java.util.Map<java.lang.String,java.lang.Object> style)

  Draws the given vertex.

  Parameters:
    `x` - X-coordinate of the vertex.
    `y` - Y-coordinate of the vertex.
    `width` - Width of the vertex.
    `height` - Height of the vertex.
    `style` - Style of the vertex.
  Returns:
    Optional object that represents the vertex.

### drawEdge

    java.lang.Object drawEdge(java.util.List<mxPoint> pts,
                              java.util.Map<java.lang.String,java.lang.Object> style)

  Draws the given edge.

  Parameters:
    `pts` - List of mxPoints that make up the edge.
    `style` - Style of the edge.
  Returns:
    Optional object that represents the edge.

### drawLabel

    java.lang.Object drawLabel(java.lang.String label,
                               int x,
                               int y,
                               int width,
                               int height,
                               java.util.Map<java.lang.String,java.lang.Object> style,
                               boolean isHtml)

  Draws the given label.

  Parameters:
    `label` - String that represents the label.
    `x` - X-coordinate of the label.
    `y` - Y-coordinate of the label.
    `width` - Width of the label.
    `height` - Height of the label.
    `style` - Style of the label.
    `isHtml` - Specifies if the label contains HTML markup.
  Returns:
    Optional object that represents the label.

JGraph X 1.3.0.0

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