public class Arc extends CurvedShape
Constructor and Description |
---|
Arc()
Create an unfilled yellow arc with a default position, size, and
angle.
|
Arc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle)
Create an unfilled black arc whose bounding rectangle has the
specified upper-left corner and dimensions and with the
specified start angle and arc angle.
|
Arc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle,
java.awt.Color c,
boolean fill)
Create an arc with the given color and filledness whose bounding
rectangle has the specified upper-left corner and dimensions and
with the specified start angle and arc angle.
|
Modifier and Type | Method and Description |
---|---|
void |
paint(java.awt.Graphics g)
Paint this shape onto the given graphics context.
|
java.lang.String |
toString()
Answer the printed representation of this shape.
|
resize
addTo, currentWindow, getBoundingBox, getCenterX, getCenterY, getColor, getHeight, getWidth, getX, getY, intersects, moveBy, moveTo, recordWindow, removeFromWindow, rotateAround, setColor
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
addTo, currentWindow, getBoundingBox, getCenterX, getCenterY, getColor, getHeight, getWidth, getX, getY, intersects, moveBy, moveTo, recordWindow, removeFromWindow, rotateAround, setColor
public Arc()
public Arc(int x, int y, int width, int height, int startAngle, int arcAngle)
x
- the x coordinate of the upper left cornery
- the y coordinate of the upper left cornerwidth
- the width of the archeight
- the height of the arcstartAngle
- the angle in degrees (counter-clockwise from 3
o'clock) to start the arcarcAngle
- the angle in degrees of the arcpublic Arc(int x, int y, int width, int height, int startAngle, int arcAngle, java.awt.Color c, boolean fill)
x
- the x coordinate of the upper left cornery
- the y coordinate of the upper left cornerwidth
- the width of the archeight
- the height of the arcstartAngle
- the angle in degrees (counter-clockwise from 3
o'clock) to start the arcarcAngle
- the angle in degrees of the arcc
- the color of the arcfill
- should it be filled?public void paint(java.awt.Graphics g)
Shape