public class Rectangle
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
double |
bottom |
double |
left |
double |
right |
double |
top |
| Constructor and Description |
|---|
Rectangle(double left,
double top,
double right,
double bottom) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(Point point) |
Rectangle |
enlarge(double left,
double top,
double right,
double bottom)
Enlarges the Rectangle sides individually
|
Rectangle |
envelope(double padding) |
boolean |
equals(java.lang.Object obj) |
Point |
getCenter() |
double |
getCenterX() |
double |
getCenterY() |
double |
getHeight() |
double |
getWidth() |
int |
hashCode() |
boolean |
intersects(Rectangle rectangle) |
boolean |
intersectsCircle(double pointX,
double pointY,
double radius) |
Rectangle |
shift(Point origin) |
java.lang.String |
toString() |
public final double bottom
public final double left
public final double right
public final double top
public boolean contains(Point point)
public Rectangle enlarge(double left, double top, double right, double bottom)
left - left enlargementtop - top enlargementright - right enlargementbottom - bottom enlargementpublic Rectangle envelope(double padding)
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic Point getCenter()
public double getCenterX()
public double getCenterY()
public double getHeight()
public double getWidth()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean intersects(Rectangle rectangle)
public boolean intersectsCircle(double pointX,
double pointY,
double radius)
public java.lang.String toString()
toString in class java.lang.Object