public class Arc extends Object
The parameters for drawing an arc include the start angle, sweep angle, and whether to draw the lines from both end points of the arc to its center.
| 构造器 | 说明 |
|---|---|
Arc() |
Default constructor used to create an
Arc instance. |
Arc(float startAngle,
float sweepAngle,
boolean useCenter) |
Parameterized constructor used to create an
Arc instance. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
float |
getStartAngle() |
Obtains the start angle of an arc.
|
float |
getSweepAngle() |
Obtains the sweep angle of an arc.
|
boolean |
getUseCenter() |
Obtains the value of the
useCenter attribute, which indicates whether to draw the lines from both end
points of the arc to its center. |
void |
setArc(float startAngle,
float sweepAngle,
boolean useCenter) |
Changes the parameters of an arc.
|
public Arc()
Arc instance.public Arc(float startAngle,
float sweepAngle,
boolean useCenter)
Arc instance.
The startAngle, sweepAngle, and useCenter parameters can be specified.
startAngle - Indicates the start angle of the arc, which zero degree is at three o'clock.sweepAngle - Indicates the sweep angle of the arc, which is clockwise rotation.useCenter - Indicates whether to draw the lines from both end points of the arc to its center.public void setArc(float startAngle,
float sweepAngle,
boolean useCenter)
The startAngle, sweepAngle, and useCenter parameters can be specified.
startAngle - Indicates the start angle of the arc.sweepAngle - Indicates the sweep angle of the arc.useCenter - Indicates whether to draw the lines from both end points of the arc to its center.public float getSweepAngle()
public float getStartAngle()
public boolean getUseCenter()
useCenter attribute, which indicates whether to draw the lines from both end
points of the arc to its center.true if the lines are drawn; returns false otherwise.