java.awt.geom
public abstract class Ellipse2D extends RectangularShape
(x/a)2 + (y/b)2 = 1
Since: 1.2
Nested Class Summary | |
---|---|
static class | Ellipse2D.Double
An {@link Ellipse2D} that stores its coordinates using double
primitives. |
static class | Ellipse2D.Float
An {@link 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. Note: An ellipse cannot be represented exactly in PathIterator segments, the outline is thefore approximated with cubic Bezier segments. |
boolean | intersects(double x, double y, double w, double h)
Determines if a rectangle intersects any part of the ellipse. |
Parameters: x - x coordinate of the point. y - y coordinate of the point.
Returns: true if the point is within the ellipse, false otherwise.
Parameters: x - x coordinate of the upper-left corner of the rectangle y - y coordinate of the upper-left corner of the rectangle w - width of the rectangle h - height of the rectangle
Returns: true if the rectangle is completely contained, false otherwise.
Note: An ellipse cannot be represented exactly in PathIterator segments, the outline is thefore approximated with cubic Bezier segments.
Parameters: at an optional transform.
Returns: A path iterator.
Parameters: x - x coordinate of the upper-left corner of the rectangle y - y coordinate of the upper-left corner of the rectangle w - width of the rectangle h - height of the rectangle
Returns: true if the rectangle intersects the ellipse, false otherwise.