psgraphics
Class DrawableArc

java.lang.Object
  extended bypsgraphics.Figure
      extended bypsgraphics.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(int centerX, int centerY, 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
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DrawableArc

public DrawableArc(int centerX,
                   int centerY,
                   int radius,
                   int angleA,
                   int angleB,
                   boolean clockwise)
Creates a new DrawableArc and initializes the parameters which describe it.

Parameters:
centerX - Center X.
centerY - Center Y.
radius - Distance from center.
angleA - Starting angle.
angleB - Ending angle.
clockwise - If is is drawn clockwise or not.
Method Detail

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.