Ellipse2D.Double, Ellipse2D.Float
Modifier and Type | Field and Description |
---|---|
float |
height
The height of the ellipse.
|
float |
width
The width of the ellipse.
|
float |
x
The upper-left x coordinate of the bounding-box
|
float |
y
The upper-left y coordinate of the bounding-box
|
Constructor and Description |
---|
Ellipse2D.Float()
Creates a new Ellipse2D with an upper-left coordinate of (0,0)
and a zero size.
|
Ellipse2D.Float(float x,
float y,
float w,
float h)
Creates a new Ellipse2D within a given rectangle
using floating-point precision.
|
Modifier and Type | Method and Description |
---|---|
Rectangle2D |
getBounds2D()
Returns the bounding-box of the ellipse.
|
double |
getHeight()
Returns the height of the ellipse.
|
double |
getWidth()
Returns the width of the ellipse.
|
double |
getX()
Returns x coordinate of the upper-left corner of
the ellipse's bounding-box.
|
double |
getY()
Returns y coordinate of the upper-left corner of
the ellipse's bounding-box.
|
boolean |
isEmpty()
Returns
true if the ellipse encloses no area, and
false otherwise. |
void |
setFrame(double x,
double y,
double w,
double h)
Sets the geometry of the ellipse's bounding box.
|
void |
setFrame(float x,
float y,
float w,
float h)
Sets the geometry of the ellipse's bounding box.
|
contains, contains, getPathIterator, intersects
clone, contains, contains, getBounds, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, getPathIterator, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal
public float height
public float width
public float x
public float y
public Ellipse2D.Float()
public Ellipse2D.Float(float x, float y, float w, float h)
x
- - x coordinate of the upper-left of the bounding rectangley
- - y coordinate of the upper-left of the bounding rectanglew
- - width of the ellipseh
- - height of the ellipsepublic Rectangle2D getBounds2D()
Shape.getBounds()
public double getHeight()
getHeight
in class RectangularShape
public double getWidth()
getWidth
in class RectangularShape
public double getX()
getX
in class RectangularShape
public double getY()
getY
in class RectangularShape
public boolean isEmpty()
true
if the ellipse encloses no area, and
false
otherwise.isEmpty
in class RectangularShape
public void setFrame(float x, float y, float w, float h)
x
- - x coordinate of the upper-left of the bounding rectangley
- - y coordinate of the upper-left of the bounding rectanglew
- - width of the ellipseh
- - height of the ellipsepublic void setFrame(double x, double y, double w, double h)
setFrame
in class RectangularShape
x
- - x coordinate of the upper-left of the bounding rectangley
- - y coordinate of the upper-left of the bounding rectanglew
- - width of the ellipseh
- - height of the ellipseRectangularShape.getFrame()