|
PulpCore | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object pulpcore.math.Rect
public class Rect
The Rect class is used internally for dirty rectangles.
Field Summary | |
---|---|
static int |
BOTTOM
The bitmask that indicates the right segment of a rectangle. |
int |
height
|
static int |
LEFT
The bitmask that indicates the bottom segment of a rectangle. |
static int |
RIGHT
The bitmask that indicates the left segment of a rectangle. |
static int |
TOP
The bitmask that indicates the top segment of a rectangle. |
int |
width
|
int |
x
|
int |
y
|
Constructor Summary | |
---|---|
Rect()
|
|
Rect(int x,
int y,
int width,
int height)
|
|
Rect(Rect r)
|
Method Summary | |
---|---|
boolean |
contains(int x,
int y)
|
boolean |
contains(int x,
int y,
int width,
int height)
|
boolean |
contains(Rect r)
|
boolean |
equals(int x,
int y,
int width,
int height)
|
boolean |
equals(Object obj)
|
int |
getArea()
|
int |
getBoundary(int side)
Returns the LEFT (x), TOP (y),
RIGHT (x + width - 1), or BOTTOM (y + height - 1)
boundary of this rectangle. |
int |
getIntersectionCode(int x,
int y,
int width,
int height)
Determines which segments of the specified rectangle are completely or partially inside this rectangle. |
int |
getIntersectionCode(Rect r)
Determines which segments of the specified rectangle are completely or partially inside this rectangle. |
static int |
getOppositeSide(int side)
|
int |
hashCode()
|
void |
intersection(int x,
int y,
int width,
int height)
Sets this rectangle to the intersection of this rectangle and the specified rectangle. |
void |
intersection(Rect r)
Sets this rectangle to the intersection of this rectangle and the specified rectangle. |
boolean |
intersects(int x,
int y,
int width,
int height)
|
boolean |
intersects(Rect r)
|
void |
setBoundary(int side,
int boundary)
|
void |
setBounds(int x,
int y,
int width,
int height)
|
void |
setBounds(Rect r)
|
void |
setOutsideBoundary(int side,
int boundary)
|
String |
toString()
|
void |
union(int x,
int y,
int width,
int height)
Sets this rectangle to the union of this rectangle and the specified rectangle. |
void |
union(Rect r)
Sets this rectangle to the union of this rectangle and the specified rectangle. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int TOP
public static final int RIGHT
public static final int BOTTOM
public static final int LEFT
public int x
public int y
public int width
public int height
Constructor Detail |
---|
public Rect()
public Rect(int x, int y, int width, int height)
public Rect(Rect r)
Method Detail |
---|
public void setBounds(Rect r)
public void setBounds(int x, int y, int width, int height)
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public boolean equals(int x, int y, int width, int height)
public int getArea()
public boolean contains(int x, int y)
public boolean contains(int x, int y, int width, int height)
public boolean contains(Rect r)
public boolean intersects(Rect r)
public boolean intersects(int x, int y, int width, int height)
public void intersection(Rect r)
public void intersection(int x, int y, int width, int height)
public void union(Rect r)
public void union(int x, int y, int width, int height)
public static int getOppositeSide(int side)
public int getBoundary(int side)
LEFT
(x), TOP
(y),
RIGHT
(x + width - 1), or BOTTOM
(y + height - 1)
boundary of this rectangle.
public void setBoundary(int side, int boundary)
public void setOutsideBoundary(int side, int boundary)
public int getIntersectionCode(Rect r)
TOP
, LEFT
, BOTTOM
, RIGHT
,
corresponding to each segment.
public int getIntersectionCode(int x, int y, int width, int height)
TOP
, LEFT
, BOTTOM
, RIGHT
,
corresponding to each segment.
public String toString()
toString
in class Object
|
PulpCore | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |