java.awt.geom
public static class Rectangle2D.Double extends Rectangle2D
double
precision.
Since: 1.2
UNKNOWN: updated to 1.4
Field Summary | |
---|---|
double | height The height of the rectangle. |
double | width The width of the rectangle. |
double | x The x coordinate of the lower left corner. |
double | y The y coordinate of the lower left corner. |
Constructor Summary | |
---|---|
Double()
Create a rectangle at (0,0) with width 0 and height 0. | |
Double(double x, double y, double w, double h)
Create a rectangle with the given values.
|
Method Summary | |
---|---|
Rectangle2D | createIntersection(Rectangle2D r)
Return a new rectangle which is the intersection of this and the given
one. |
Rectangle2D | createUnion(Rectangle2D r)
Return a new rectangle which is the union of this and the given one.
|
Rectangle2D | getBounds2D()
Returns the bounds of this rectangle. |
double | getHeight()
Return the height.
|
double | getWidth()
Return the width.
|
double | getX()
Return the X coordinate.
|
double | getY()
Return the Y coordinate.
|
boolean | isEmpty()
Test if the rectangle is empty.
|
int | outcode(double x, double y)
Determine where the point lies with respect to this rectangle. |
void | setRect(double x, double y, double w, double h)
Set the contents of this rectangle to those specified.
|
void | setRect(Rectangle2D r)
Set the contents of this rectangle to those specified.
|
String | toString()
Returns a string representation of this rectangle. |
Parameters: x the x coordinate y the y coordinate w the width h the height
Parameters: r the rectangle to be intersected
Returns: the intersection
Throws: NullPointerException if r is null
Parameters: r the rectangle to be merged
Returns: the union
Throws: NullPointerException if r is null
Returns: a copy of this rectangle
Returns: the value of height
Returns: the value of width
Returns: the value of x
Returns: the value of y
Returns: true if width or height is not positive
Parameters: x the x coordinate to check y the y coordinate to check
Returns: the binary OR of the result
Since: 1.2
Parameters: x the x coordinate y the y coordinate w the width h the height
Parameters: r the rectangle to copy
Throws: NullPointerException if r is null
getClass().getName() + "[x=" + x + ",y=" + y + ",w=" + width
+ ",h=" + height + ']'
.
Returns: a string representation of this rectangle