|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.geom.RectangularShape
java.awt.geom.Ellipse2D
public abstract class Ellipse2D
Ellipse2D is the shape of an ellipse.
The ellipse is defined by it's bounding box (shown in red),
and is defined by the implicit curve:
(x/a)2 + (y/b)2 = 1
Nested Class Summary | |
---|---|
static class |
Ellipse2D.Double
An Ellipse2D that stores its coordinates using double
primitives. |
static class |
Ellipse2D.Float
An Ellipse2D that stores its coordinates using float
primitives. |
Constructor Summary | |
---|---|
protected |
Ellipse2D()
Ellipse2D is defined as abstract. |
Method Summary | |
---|---|
boolean |
contains(double x,
double y)
Determines if a point is contained within the ellipse. |
boolean |
contains(double x,
double y,
double w,
double h)
Determines if a rectangle is completely contained within the ellipse. |
PathIterator |
getPathIterator(AffineTransform at)
Returns a PathIterator object corresponding to the ellipse. |
boolean |
intersects(double x,
double y,
double w,
double h)
Determines if a rectangle intersects any part of the ellipse. |
Methods inherited from class java.awt.geom.RectangularShape |
---|
clone, contains, contains, getBounds, getCenterX, getCenterY, getFrame, getHeight, getMaxX, getMaxY, getMinX, getMinY, getPathIterator, getWidth, getX, getY, intersects, isEmpty, setFrame, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.awt.Shape |
---|
getBounds2D |
Constructor Detail |
---|
protected Ellipse2D()
Method Detail |
---|
public boolean contains(double x, double y)
x
- - x coordinate of the point.y
- - y coordinate of the point.
public boolean contains(double x, double y, double w, double h)
x
- - x coordinate of the upper-left corner of the rectangley
- - y coordinate of the upper-left corner of the rectanglew
- - width of the rectangleh
- - height of the rectangle
Area
public PathIterator getPathIterator(AffineTransform at)
Note: An ellipse cannot be represented exactly in PathIterator segments, the outline is thefore approximated with cubic Bezier segments.
at
- an optional transform.
public boolean intersects(double x, double y, double w, double h)
x
- - x coordinate of the upper-left corner of the rectangley
- - y coordinate of the upper-left corner of the rectanglew
- - width of the rectangleh
- - height of the rectangle
Area
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |