- #1
zak100
- 462
- 11
Homework Statement
Hi,
I am trying to draw an arc at the top of two parallel lines i.e connecting two coordinate (130, 170) & (230, 170) using the function below. I can't understand how to start the arc at a particular point.
public abstract void fillArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle)
The resulting arc begins at startAngle and extends for arcAngle degrees. Angles are interpreted such that 0 degrees is at the 3 o'clock position. A positive value indicates a counter-clockwise rotation while a negative value indicates a clockwise rotation.
The center of the arc is the center of the rectangle whose origin is (x, y) and
whose size is specified by the width and height arguments.
Homework Equations
Instead of eq i have a function:
public abstract void fillArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle)
The Attempt at a Solution
g.drawLine(130, 170, 130, 270);
g.drawLine(230, 170, 230, 270);
g.drawArc(80, 220, 100,30, 0, 180);
I have stored my result in the image. Some body please guide me,
Zulfi.