forked from jgraph/mxgraph
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmxICanvas.java
More file actions
55 lines (47 loc) · 1.16 KB
/
mxICanvas.java
File metadata and controls
55 lines (47 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/**
* Copyright (c) 2007-2010, Gaudenz Alder, David Benson
*/
package com.mxgraph.canvas;
import com.mxgraph.util.mxPoint;
import com.mxgraph.view.mxCellState;
/**
* Defines the requirements for a canvas that paints the vertices and edges of
* a graph.
*/
public interface mxICanvas
{
/**
* Sets the translation for the following drawing requests.
*/
void setTranslate(double x, double y);
/**
* Returns the current translation.
*
* @return Returns the current translation.
*/
mxPoint getTranslate();
/**
* Sets the scale for the following drawing requests.
*/
void setScale(double scale);
/**
* Returns the scale.
*/
double getScale();
/**
* Draws the given cell.
*
* @param state State of the cell to be painted.
* @return Object that represents the cell.
*/
Object drawCell(mxCellState state);
/**
* Draws the given label.
*
* @param text String that represents the label.
* @param state State of the cell whose label is to be painted.
* @param html Specifies if the label contains HTML markup.
* @return Object that represents the label.
*/
Object drawLabel(String text, mxCellState state, boolean html);
}