| Constructor and Description |
|---|
Rect(int x,
int y,
int width,
int height) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(int px,
int py)
Returns true if the specified point is located within this shape.
|
boolean |
contains(int rx,
int ry,
int rwidth,
int rheight) |
boolean |
contains(Point2D p)
Returns true if the specified point
p is located within this shape. |
boolean |
contains(Shape s)
Returns true if the shape
s is entirely located within this shape. |
boolean |
equals(java.lang.Object o) |
int |
getCenterX() |
int |
getCenterY() |
int |
getEndX() |
int |
getEndY() |
int |
getHeight() |
int |
getWidth() |
int |
getX() |
int |
getY() |
int |
hashCode() |
boolean |
intersects(int rx,
int ry,
int rwidth,
int rheight) |
boolean |
intersects(Shape s)
Returns true if the shape
s is entirely or partially located within
this shape. |
void |
set(int x,
int y,
int width,
int height) |
void |
setHeight(int height) |
void |
setWidth(int width) |
void |
setX(int x) |
void |
setY(int y) |
Polygon |
toPolygon() |
java.lang.String |
toString() |
public void set(int x,
int y,
int width,
int height)
public void setX(int x)
public int getX()
public void setY(int y)
public int getY()
public void setWidth(int width)
public int getWidth()
public void setHeight(int height)
public int getHeight()
public int getEndX()
public int getEndY()
public int getCenterX()
public int getCenterY()
public boolean contains(Point2D p)
Shapep is located within this shape.
This includes cases where the point is located on one of the edges.public boolean contains(int px,
int py)
Shapepublic boolean contains(Shape s)
Shapes is entirely located within this shape.
This includes cases where the shape is located on this shape's edges.public boolean contains(int rx,
int ry,
int rwidth,
int rheight)
public boolean intersects(Shape s)
Shapes is entirely or partially located within
this shape.intersects in interface Shapepublic boolean intersects(int rx,
int ry,
int rwidth,
int rheight)
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object