Ellipse2D
class describes an ellipse that is defined
by a framing rectangle.
This class is only the abstract superclass for all objects which store a 2D ellipse. The actual storage representation of the coordinates is left to the subclass.
Modifier and Type | Class and Description |
---|---|
public static class | Ellipse2D.
The |
public static class | Ellipse2D.
The |
Access | Constructor and Description |
---|---|
protected |
Modifier and Type | Method and Description |
---|---|
public boolean | contains(double
the specified X coordinate to be tested x, double the specified Y coordinate to be tested y)Implements java. Shape , as described by the
definition of insideness.
|
public boolean | contains(double
the X coordinate of the upper-left corner
of the specified rectangular area x, double the Y coordinate of the upper-left corner
of the specified rectangular area y, double the width of the specified rectangular area w, double the height of the specified rectangular area h)Implements java. Shape entirely contains
the specified rectangular area.
|
public boolean | Returns: true if obj is an instance
of Ellipse2D and has the same values;
false otherwise.an obj)Object to be compared with this
Ellipse2D .Overrides java. Object is
equal to this Ellipse2D .
|
public PathIterator | Returns: thePathIterator object that returns the
geometry of the outline of this Ellipse2D ,
one segment at a time.an optional at)AffineTransform to be applied to
the coordinates as they are returned in the iteration, or
null if untransformed coordinates are desiredImplements java. Ellipse2D .
|
public int | Returns: the hashcode for thisEllipse2D .Overrides java. Ellipse2D .
|
public boolean | intersects(double
the X coordinate of the upper-left corner
of the specified rectangular area x, double the Y coordinate of the upper-left corner
of the specified rectangular area y, double the width of the specified rectangular area w, double the height of the specified rectangular area h)Implements java. Shape intersects the
interior of a specified rectangular area.
|
Ellipse2D | back to summary |
---|---|
protected Ellipse2D() This is an abstract class that cannot be instantiated directly. Type-specific implementation subclasses are available for instantiation and provide a number of formats for storing the information necessary to satisfy the various accessor methods below.
|
contains | back to summary |
---|---|
public boolean contains(double x, double y) Implements java. Doc from java. Tests if the specified coordinates are inside the boundary of the
|
contains | back to summary |
---|---|
public boolean contains(double x, double y, double w, double h) Implements java. Doc from java. Tests if the interior of the
The
Shapes this method might
return false even though the Shape contains
the rectangular area.
The Area class performs
more accurate geometric computations than most
Shape objects and therefore can be used if a more precise
answer is required.
|
equals | back to summary |
---|---|
public boolean equals(Object obj) Overrides java. Determines whether or not the specified
|
getPathIterator | back to summary |
---|---|
public PathIterator getPathIterator(AffineTransform at) Implements java. Returns an iteration object that defines the boundary of this
|
hashCode | back to summary |
---|---|
public int hashCode() Overrides java. Returns the hashcode for this
|
intersects | back to summary |
---|---|
public boolean intersects(double x, double y, double w, double h) Implements java. Doc from java. Tests if the interior of the
The
Shapes this method might
return true even though the rectangular area does not
intersect the Shape .
The Area class performs
more accurate computations of geometric intersection than most
Shape objects and therefore can be used if a more precise
answer is required.
|
Double
class defines an ellipse specified
in double
precision.
Modifier and Type | Field and Description |
---|---|
public double | height
The overall height of the |
private static final long | serialVersionUID
Use serialVersionUID from JDK 1.6 for interoperability. |
public double | width
The overall width of this |
public double | x
The X coordinate of the upper-left corner of the
framing rectangle of this |
public double | y
The Y coordinate of the upper-left corner of the
framing rectangle of this |
Access | Constructor and Description |
---|---|
public | |
public | Double(double
the X coordinate of the upper-left corner
of the framing rectangle x, double the Y coordinate of the upper-left corner
of the framing rectangle y, double the width of the framing rectangle w, double the height of the framing rectangle h)Constructs and initializes an |
Modifier and Type | Method and Description |
---|---|
public Rectangle2D | getBounds2D()
Implements java. Shape than the getBounds method.
|
public double | getHeight()
Implements abstract java. double precision.
|
public double | getWidth()
Implements abstract java. double precision.
|
public double | getX()
Implements abstract java. double precision.
|
public double | getY()
Implements abstract java. double precision.
|
public boolean | isEmpty()
Implements abstract java. RectangularShape is empty.
|
public void | setFrame(double
the X coordinate of the upper-left corner of the
specified rectangular shape x, double the Y coordinate of the upper-left corner of the
specified rectangular shape y, double the width of the specified rectangular shape w, double the height of the specified rectangular shape h)Implements abstract java. Shape to the specified rectangular values.
|
height | back to summary |
---|---|
public double height The overall height of the
|
serialVersionUID | back to summary |
---|---|
private static final long serialVersionUID Use serialVersionUID from JDK 1.6 for interoperability. |
width | back to summary |
---|---|
public double width The overall width of this
|
x | back to summary |
---|---|
public double x The X coordinate of the upper-left corner of the
framing rectangle of this
|
y | back to summary |
---|---|
public double y The Y coordinate of the upper-left corner of the
framing rectangle of this
|
Double | back to summary |
---|---|
public Double() Constructs a new
|
Double | back to summary |
---|---|
public Double(double x, double y, double w, double h) Constructs and initializes an
|
getBounds2D | back to summary |
---|---|
public Rectangle2D getBounds2D() Implements java. Doc from java. Returns a high precision and more accurate bounding box of
the
Note that the
definition of insideness can lead to situations where points
on the defining outline of the
If a
If a
|
getHeight | back to summary |
---|---|
public double getHeight() Implements abstract java. Doc from java. Returns the height of the framing rectangle
in
|
getWidth | back to summary |
---|---|
public double getWidth() Implements abstract java. Doc from java. Returns the width of the framing rectangle in
|
getX | back to summary |
---|---|
public double getX() Implements abstract java. Doc from java. Returns the X coordinate of the upper-left corner of
the framing rectangle in
|
getY | back to summary |
---|---|
public double getY() Implements abstract java. Doc from java. Returns the Y coordinate of the upper-left corner of
the framing rectangle in
|
isEmpty | back to summary |
---|---|
public boolean isEmpty() Implements abstract java. Doc from java. Determines whether the
|
setFrame | back to summary |
---|---|
public void setFrame(double x, double y, double w, double h) Implements abstract java. Doc from java. Sets the location and size of the framing rectangle of this
|
Float
class defines an ellipse specified
in float
precision.
Modifier and Type | Field and Description |
---|---|
public float | height
The overall height of this |
private static final long | serialVersionUID
Use serialVersionUID from JDK 1.6 for interoperability. |
public float | width
The overall width of this |
public float | x
The X coordinate of the upper-left corner of the
framing rectangle of this |
public float | y
The Y coordinate of the upper-left corner of the
framing rectangle of this |
Access | Constructor and Description |
---|---|
public | |
public | Float(float
the X coordinate of the upper-left corner
of the framing rectangle x, float the Y coordinate of the upper-left corner
of the framing rectangle y, float the width of the framing rectangle w, float the height of the framing rectangle h)Constructs and initializes an |
Modifier and Type | Method and Description |
---|---|
public Rectangle2D | getBounds2D()
Implements java. Shape than the getBounds method.
|
public double | getHeight()
Implements abstract java. double precision.
|
public double | getWidth()
Implements abstract java. double precision.
|
public double | getX()
Implements abstract java. double precision.
|
public double | getY()
Implements abstract java. double precision.
|
public boolean | isEmpty()
Implements abstract java. RectangularShape is empty.
|
public void | setFrame(float
the X coordinate of the upper-left corner of the
specified rectangular shape x, float the Y coordinate of the upper-left corner of the
specified rectangular shape y, float the width of the specified rectangular shape w, float the height of the specified rectangular shape h)Sets the location and size of the framing rectangle of this
|
public void | setFrame(double
the X coordinate of the upper-left corner of the
specified rectangular shape x, double the Y coordinate of the upper-left corner of the
specified rectangular shape y, double the width of the specified rectangular shape w, double the height of the specified rectangular shape h)Implements abstract java. Shape to the specified rectangular values.
|
height | back to summary |
---|---|
public float height The overall height of this
|
serialVersionUID | back to summary |
---|---|
private static final long serialVersionUID Use serialVersionUID from JDK 1.6 for interoperability. |
width | back to summary |
---|---|
public float width The overall width of this
|
x | back to summary |
---|---|
public float x The X coordinate of the upper-left corner of the
framing rectangle of this
|
y | back to summary |
---|---|
public float y The Y coordinate of the upper-left corner of the
framing rectangle of this
|
Float | back to summary |
---|---|
public Float() Constructs a new
|
Float | back to summary |
---|---|
public Float(float x, float y, float w, float h) Constructs and initializes an
|
getBounds2D | back to summary |
---|---|
public Rectangle2D getBounds2D() Implements java. Doc from java. Returns a high precision and more accurate bounding box of
the
Note that the
definition of insideness can lead to situations where points
on the defining outline of the
If a
If a
|
getHeight | back to summary |
---|---|
public double getHeight() Implements abstract java. Doc from java. Returns the height of the framing rectangle
in
|
getWidth | back to summary |
---|---|
public double getWidth() Implements abstract java. Doc from java. Returns the width of the framing rectangle in
|
getX | back to summary |
---|---|
public double getX() Implements abstract java. Doc from java. Returns the X coordinate of the upper-left corner of
the framing rectangle in
|
getY | back to summary |
---|---|
public double getY() Implements abstract java. Doc from java. Returns the Y coordinate of the upper-left corner of
the framing rectangle in
|
isEmpty | back to summary |
---|---|
public boolean isEmpty() Implements abstract java. Doc from java. Determines whether the
|
setFrame | back to summary |
---|---|
public void setFrame(float x, float y, float w, float h) Sets the location and size of the framing rectangle of this
|
setFrame | back to summary |
---|---|
public void setFrame(double x, double y, double w, double h) Implements abstract java. Doc from java. Sets the location and size of the framing rectangle of this
|