public class Rect
extends java.lang.Object
| Constructor and Description |
|---|
Rect() |
Rect(int left,
int top,
int right,
int bottom)
Construct a new Rect with specified left, top, right, and bottom.
|
Rect(java.awt.Rectangle rectangle)
Create a Rect object with the same origin and dimensions as a Java Rectangle.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getHeight() |
int |
getWidth() |
void |
setRect(int newleft,
int newtop,
int newright,
int newbottom) |
java.awt.Rectangle |
toRectangle()
Create a Java Rectangle with the equivalent origin and dimensions of this Rect.
|
Rect |
unionRect(Rect r)
Expand this rectangle where necessary so that it encompasses the given rectangle.
|
public int left
public int right
public int top
public int bottom
public Rect()
public Rect(int left,
int top,
int right,
int bottom)
left - top - right - bottom - public Rect(java.awt.Rectangle rectangle)
rectangle - public Rect unionRect(Rect r)
r - public int getWidth()
public int getHeight()
public java.awt.Rectangle toRectangle()
public void setRect(int newleft,
int newtop,
int newright,
int newbottom)