|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.opengl.util.packrect.Rect
public class Rect
Represents a rectangular region on the backing store. The edges of the rectangle are the infinitely thin region between adjacent pixels on the screen. The origin of the rectangle is its upper-left corner. It is inclusive of the pixels on the top and left edges and exclusive of the pixels on the bottom and right edges. For example, a rect at position (0, 0) and of size (1, 1) would include only the pixel at (0, 0).
Negative coordinates and sizes are not supported, since they make no sense in the context of the packer, which deals only with positively sized regions.
This class contains a user data field for efficient hookup to external data structures as well as enough other hooks to efficiently plug into the rectangle packer.
Constructor Summary | |
---|---|
Rect()
|
|
Rect(int x,
int y,
int w,
int h,
Object userData)
|
|
Rect(Object userData)
|
Method Summary | |
---|---|
boolean |
canContain(Rect other)
|
Rect |
getNextLocation()
|
Object |
getUserData()
|
int |
h()
|
int |
maxX()
Returns the maximum x-coordinate contained within this rectangle. |
int |
maxY()
Returns the maximum y-coordinate contained within this rectangle. |
void |
setNextLocation(Rect nextLocation)
|
void |
setPosition(int x,
int y)
|
void |
setSize(int w,
int h)
|
void |
setUserData(Object obj)
|
String |
toString()
|
int |
w()
|
int |
x()
|
int |
y()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Rect()
public Rect(Object userData)
public Rect(int x, int y, int w, int h, Object userData)
Method Detail |
---|
public int x()
public int y()
public int w()
public int h()
public Object getUserData()
public Rect getNextLocation()
public void setPosition(int x, int y)
public void setSize(int w, int h) throws IllegalArgumentException
IllegalArgumentException
public void setUserData(Object obj)
public void setNextLocation(Rect nextLocation)
public int maxX()
public int maxY()
public boolean canContain(Rect other)
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |