|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--waba.fx.Rect
Rect is a rectangle.
Field Summary | |
int |
height
rectangle height |
static int |
SAME
|
int |
width
rectangle width |
int |
x
x position |
int |
y
y position |
Constructor Summary | |
Rect()
Constructs a rectangle with all args = 0. |
|
Rect(Coord topleft,
Coord bottomright)
Constructs a rectangle with the given coords |
|
Rect(int x,
int y,
int width,
int height)
Constructs a rectangle with the given x, y, width and height. |
Method Summary | |
boolean |
contains(int xx,
int yy)
returns true if the point xx,yy is inside this rect. added by guich |
boolean |
equals(Object other)
Returns true if the bounds of this Rect and the given one are the same |
boolean |
intersects(Rect r)
returns true if this rectangle intersects with the given one |
Rect |
intersectWith(Rect r)
Modify this Rect by doing the intersection with the given rect. |
Rect |
modifiedBy(int deltaX,
int deltaY,
int deltaW,
int deltaH)
returns a new rect modified in the specified parameters. you can use the constant SAME so the value is not modified (or use 0). |
void |
modify(int deltaX,
int deltaY,
int deltaW,
int deltaH)
modifies this rect with the specified parameters. you can use the constant SAME so the value is not modified (or use 0). |
void |
set(int x,
int y,
int width,
int height)
sets the coords of this rect. |
void |
set(Rect r)
sets the coords of this rect. |
String |
toString()
Returns the string representation of the object, that is full_class_name@internal_address_hex. |
void |
translate(int deltaX,
int deltaY)
translates this rect. the new positions will be this.x+xx,this.y+yy. |
Rect |
unionWith(Rect r)
Modify this Rect by doing an union with the given rect. |
int |
x2()
returns x+width-1 |
int |
y2()
returns y+height-1 |
Methods inherited from class java.lang.Object |
getClass,
hashCode,
notify,
wait,
wait |
Field Detail |
public int x
public int y
public int width
public int height
public static final int SAME
Constructor Detail |
public Rect()
public Rect(int x, int y, int width, int height)
public Rect(Coord topleft, Coord bottomright)
Method Detail |
public void set(int x, int y, int width, int height)
public void set(Rect r)
public boolean contains(int xx, int yy)
public String toString()
public void translate(int deltaX, int deltaY)
public Rect modifiedBy(int deltaX, int deltaY, int deltaW, int deltaH)
public void modify(int deltaX, int deltaY, int deltaW, int deltaH)
public int x2()
public int y2()
public boolean intersects(Rect r)
public Rect intersectWith(Rect r)
this
.public Rect unionWith(Rect r)
this
public boolean equals(Object other)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |