psgraphics
Class DrawableArc
java.lang.Object
psgraphics.Figure
psgraphics.DrawableArc
- public class DrawableArc
- extends Figure
Represents an arc that can be drawn to the screen. Each parameter describe the center of the arc, the distance from
the center, the starting and ending angle, and also if it is drawn clockwise or counter-clockwise.
|
Constructor Summary |
DrawableArc(java.awt.Point center,
int radius,
int angleA,
int angleB,
boolean clockwise)
Creates a new DrawableArc and initializes the parameters which describe it. |
|
Method Summary |
void |
draw(java.awt.Graphics g)
Draws the arc on the drawing area of the postscript interpreter. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DrawableArc
public DrawableArc(java.awt.Point center,
int radius,
int angleA,
int angleB,
boolean clockwise)
- Creates a new DrawableArc and initializes the parameters which describe it.
Precondition: The right parameters must be given.
Postcondition : A new DrawableArc will be created.
- Parameters:
center - Center x,y.radius - Distance from center.angleA - Starting angle.angleB - Ending angle.clockwise - If is is drawn clockwise or not.
draw
public void draw(java.awt.Graphics g)
- Draws the arc on the drawing area of the postscript interpreter.
Precondition : Must be called by the paint method of the component it draws on and given the same
Graphics parameter.
Postcondition : The figure will be drawn on the drawing area.
- Specified by:
draw in class Figure
- Parameters:
g - The same Graphics parameter passed to the paint method of the drawing area.