
public class PreciseRectangle extends Object
| Constructor and Description | 
|---|
PreciseRectangle()
Creates a double precision rectangle. 
 | 
PreciseRectangle(double x,
                double y,
                double width,
                double height)
Creates a double precision rectangle. 
 | 
PreciseRectangle(Rectangle rectangle)
Creates a double precision rectangle using the given  
Rectangle. | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
contains(double x,
        double y)  | 
boolean | 
contains(double x,
        double y,
        double tolerance)
Returns true if the point is within the rectangle's region. 
 | 
boolean | 
contains(PrecisePoint p)
Returns true if the point is within the rectangle. 
 | 
boolean | 
contains(PrecisePoint p,
        double tolerance)  | 
boolean | 
equals(Object obj)  | 
double | 
getHeight()
Returns the height of the rectangle. 
 | 
double | 
getWidth()
Returns the width of the rectangle. 
 | 
double | 
getX()
Returns the x-coordinate of the rectangle. 
 | 
double | 
getY()
Returns the y-coordinate of the rectangle. 
 | 
int | 
hashCode()  | 
void | 
setHeight(double height)
Sets the height of the rectangle. 
 | 
void | 
setWidth(double width)
Sets the width of the rectangle. 
 | 
void | 
setX(double x)
Sets the x-coordinate of the rectangle. 
 | 
void | 
setY(double y)
Sets the y-coordinate of the rectangle. 
 | 
String | 
toString()  | 
public PreciseRectangle()
public PreciseRectangle(double x,
                        double y,
                        double width,
                        double height)
x - the x-coordinate of the rectangley - the y-coordinate of the rectanglewidth - the width of the rectangleheight - the height of the rectanglepublic boolean contains(double x,
                        double y)
public boolean contains(double x,
                        double y,
                        double tolerance)
x - the x coordinate valuey - the y coordinate valuetolerance - the tolerance factorpublic boolean contains(PrecisePoint p)
p - the pointpublic boolean contains(PrecisePoint p, double tolerance)
public double getHeight()
public double getWidth()
public double getX()
public double getY()
public void setHeight(double height)
height - the height of the rectanglepublic void setWidth(double width)
width - the width of the rectanglepublic void setX(double x)
x - the x-coordinate of the rectanglepublic void setY(double y)
y - the y-coordinate of the rectangleCopyright © 2018. All rights reserved.