|
TinyLine v2.0 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.tinyline.tiny2d.TinyRect
The TinyRect class specifies an area in a coordinate space that is enclosed by the TinyRect object's top-left point (xmin, ymin ) and down-right point (xmax, ymax ) in the coordinate space.
| Field Summary | |
int |
xmax
the down-right corner X coordinate |
int |
xmin
the top-left corner X coordinate |
int |
ymax
the down-right corner Y coordinate |
int |
ymin
the top-left corner Y coordinate |
| Constructor Summary | |
TinyRect()
Constructs a new TinyRect empty rectangle. |
|
TinyRect(int x0,
int y0,
int x1,
int y1)
Constructs a new TinyRect whose top-left corner is specified as (x0, y0) and whose down-right corner is specified as (x1, y1). |
|
TinyRect(TinyRect rect)
Constructs a new TinyRect, initialized from the specificed TinyRect. |
|
| Method Summary | |
void |
add(TinyPoint point)
Adds a point to this TinyRect. |
boolean |
contains(TinyPoint point)
Checks whether or not this TinyRect contains the specified Point. |
void |
copy(TinyRect src)
Copyies TinyRect src to this TinyRect . |
TinyRect |
grow(int dx,
int dy)
This TinyRect grows from the center in each direction. |
TinyRect |
intersection(TinyRect r)
Computes the intersection of this TinyRect with the specified TinyRect. |
boolean |
intersects(TinyRect rect)
Determines whether or not this TinyRect and the specified TinyRect intersect. |
boolean |
isEmpty()
Determines whether or not this TinyRect is empty. |
void |
setEmpty()
Sets this TinyRect empty. |
void |
union(TinyRect rect)
Computes the union of this TinyRect with the specified TinyRect. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public int xmin
public int ymin
public int xmax
public int ymax
| Constructor Detail |
public TinyRect()
public TinyRect(TinyRect rect)
rect - the TinyRect from which to copy initial values.
public TinyRect(int x0,
int y0,
int x1,
int y1)
| Method Detail |
public void copy(TinyRect src)
[this] = [src]
src - the TinyRect object.
public TinyRect grow(int dx,
int dy)
dx - and dy are the specified coordinates deltas.
public void setEmpty()
public void union(TinyRect rect)
rect - the specified TinyRect
public TinyRect intersection(TinyRect r)
r - the specified TinyRect.
public void add(TinyPoint point)
point - the new pointpublic boolean isEmpty()
public boolean contains(TinyPoint point)
point - the Point to test
public boolean intersects(TinyRect rect)
rect - the specified TinyRect
|
TinyLine v2.0 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||