java.awt.geom
public static class Arc2D.Double extends Arc2D
Arc2D.Double, Arc2D.Float
Modifier and Type | Field and Description |
---|---|
double |
extent
The extent angle of this arc, in degrees.
|
double |
height
The height of the box bounding the ellipse of this arc.
|
double |
start
The start angle of this arc, in degrees.
|
double |
width
The width of the box bounding the ellipse of this arc.
|
double |
x
The x coordinate of the box bounding the ellipse of this arc.
|
double |
y
The y coordinate of the box bounding the ellipse of this arc.
|
Constructor and Description |
---|
Arc2D.Double()
Create a new, open arc at (0,0) with 0 extent.
|
Arc2D.Double(double x,
double y,
double w,
double h,
double start,
double extent,
int type)
Create a new arc with the given dimensions.
|
Arc2D.Double(int type)
Create a new arc of the given type at (0,0) with 0 extent.
|
Arc2D.Double(Rectangle2D r,
double start,
double extent,
int type)
Create a new arc with the given dimensions.
|
Modifier and Type | Method and Description |
---|---|
double |
getAngleExtent()
Return the extent of the arc, in degrees.
|
double |
getAngleStart()
Return the start angle of the arc, in degrees.
|
double |
getHeight()
Return the height of the bounding box.
|
double |
getWidth()
Return the width of the bounding box.
|
double |
getX()
Return the x coordinate of the bounding box.
|
double |
getY()
Return the y coordinate of the bounding box.
|
boolean |
isEmpty()
Tests if the arc contains points.
|
protected Rectangle2D |
makeBounds(double x,
double y,
double w,
double h)
Creates a tight bounding box given dimensions that more precise than
the bounding box of the ellipse.
|
void |
setAngleExtent(double extent)
Sets the extent angle of the arc.
|
void |
setAngleStart(double start)
Sets the start angle of the arc.
|
void |
setArc(double x,
double y,
double w,
double h,
double start,
double extent,
int type)
Sets the arc to the given dimensions.
|
contains, contains, contains, containsAngle, getArcType, getBounds2D, getEndPoint, getPathIterator, getStartPoint, intersects, setAngles, setAngles, setAngleStart, setArc, setArc, setArc, setArcByCenter, setArcByTangent, setArcType, setFrame
clone, contains, getBounds, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, getPathIterator, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal
public double x
public double y
public double width
public double height
public double start
public double extent
public Arc2D.Double()
public Arc2D.Double(int type)
type
- the arc type: Arc2D.OPEN
, Arc2D.CHORD
, or Arc2D.PIE
IllegalArgumentException
- if type is invalidpublic Arc2D.Double(double x, double y, double w, double h, double start, double extent, int type)
x
- the x coordinatey
- the y coordinatew
- the widthh
- the heightstart
- the start angle, in degreesextent
- the extent, in degreestype
- the arc type: Arc2D.OPEN
, Arc2D.CHORD
, or Arc2D.PIE
IllegalArgumentException
- if type is invalidpublic Arc2D.Double(Rectangle2D r, double start, double extent, int type)
r
- the bounding boxstart
- the start angle, in degreesextent
- the extent, in degreestype
- the arc type: Arc2D.OPEN
, Arc2D.CHORD
, or Arc2D.PIE
IllegalArgumentException
- if type is invalidNullPointerException
- if r is nullpublic double getX()
getX
in class RectangularShape
public double getY()
getY
in class RectangularShape
public double getWidth()
getWidth
in class RectangularShape
public double getHeight()
getHeight
in class RectangularShape
public double getAngleStart()
getAngleStart
in class Arc2D
Arc2D.setAngleStart(double)
public double getAngleExtent()
getAngleExtent
in class Arc2D
Arc2D.setAngleExtent(double)
public boolean isEmpty()
isEmpty
in class RectangularShape
public void setArc(double x, double y, double w, double h, double start, double extent, int type)
setArc
in class Arc2D
x
- the x coordinatey
- the y coordinatew
- the widthh
- the heightstart
- the start angle, in degreesextent
- the extent, in degreestype
- the arc type: Arc2D.OPEN
, Arc2D.CHORD
, or Arc2D.PIE
IllegalArgumentException
- if type is invalidpublic void setAngleStart(double start)
setAngleStart
in class Arc2D
start
- the new start angleArc2D.getAngleStart()
public void setAngleExtent(double extent)
setAngleExtent
in class Arc2D
extent
- the new extent angleArc2D.getAngleExtent()
protected Rectangle2D makeBounds(double x, double y, double w, double h)
makeBounds
in class Arc2D
x
- the x coordinatey
- the y coordinatew
- the widthh
- the height