- Enclosing class:
- Graph
public static interface Graph.UserGraphic
Interface for user-space objects that can be drawn on a graph.
The object is drawn as if it was located at the
origin in user space and may be translated so that its reference
point will appear at a specified location in graph-coordinate space.
such a translation is provided by the Graphics2D passed as the
second argument to the
addTo(Graph,Graphics2D)
method.-
Method Summary
Modifier and TypeMethodDescriptionvoid
addTo
(Graph graph, Graphics2D g2d) Add this object to a graph.
-
Method Details
-
addTo
Add this object to a graph. The drawing operation is assumed to be a complex one that might involve fills, etc. In a typical case, users will use the g2d argument directly, but may wish to look up various parameters associated with a graph (for example, the width or height).- Parameters:
graph
- the graph on which this object should be drawng2d
- the Graphics2D to use to draw the graph (which is responsible for any necessary translations)
-