annas.graph.drawing
Class DefaultDrawableArc<A>
java.lang.Object
annas.graph.drawing.DefaultDrawableArc<A>
- Type Parameters:
A
-
- All Implemented Interfaces:
- DrawArc<A>
public class DefaultDrawableArc<A>
- extends java.lang.Object
- implements DrawArc<A>
Default implementation of Arc drawer. Draws a straight line from two points
(with no indication of direction).
- Author:
- Sam Wilson
Method Summary |
void |
drawArc(java.awt.Graphics2D graphic,
A arc,
int x1,
int y1,
int x2,
int y2)
Draws an arc at a given point. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultDrawableArc
public DefaultDrawableArc()
DefaultDrawableArc
public DefaultDrawableArc(java.awt.Color color)
drawArc
public void drawArc(java.awt.Graphics2D graphic,
A arc,
int x1,
int y1,
int x2,
int y2)
- Draws an arc at a given point.
- Specified by:
drawArc
in interface DrawArc<A>
- Parameters:
graphic
- Graphic object from the image the arc is to be drawn onarc
- arc to drawx1
- x coordinate of the taily1
- y coordinate of the tailx2
- x coordinate of the heady2
- y coordinate of the head