|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openmali.types.twodee.Dim2i
public class Dim2i
A basic 2-dimensional unpositioned rectangle.
| Field Summary | |
|---|---|
protected boolean |
isDirty
|
| Constructor Summary | |
|---|---|
Dim2i()
Creates a new 2-dimensional unpositioned rectangle with zero position and size. |
|
Dim2i(int width,
int height)
Creates a new 2-dimensional unpositioned rectangle. |
|
Dim2i(Sized2iRO template)
Creates a new 2-dimensional unpositioned rectangle and copies the template's coordinates. |
|
| Method Summary | ||
|---|---|---|
Dim2i |
add(int dw,
int dh)
Adds the deltas to the values. |
|
Dim2i |
addH(int dh)
Adds the deltas to the values. |
|
Dim2i |
addW(int dw)
Adds the deltas to the values. |
|
boolean |
equals(java.lang.Object o)
|
|
boolean |
equals(Sized2iRO rect)
|
|
static Dim2i |
fromPool()
|
|
static Dim2i |
fromPool(int width,
int height)
|
|
float |
getAspect()
|
|
int |
getHeight()
|
|
int |
getWidth()
|
|
boolean |
isDirty()
|
|
Dim2i |
scale(int factW,
int factH)
Multiplies the values with these factors. |
|
Dim2i |
scaleH(int factH)
Multiplies the values with these factors. |
|
Dim2i |
scaleW(int factW)
Multiplies the values with these factors. |
|
Dim2i |
set(int width,
int height)
Sets this rectangle's coordinates to the given rectangle's ones. |
|
Dim2i |
set(Sized2iRO size)
Sets this rectangle's coordinates to the given rectangle's ones. |
|
void |
setClean()
Marks this object as not dirty. |
|
void |
setHeight(int height)
Sets the height. |
|
Dim2i |
setSize(int width,
int height)
Sets the size. |
|
Dim2i |
setSize(Sized2iRO size)
Sets the size. |
|
Dim2i |
setSize(Tuple2i size)
Sets the size. |
|
void |
setWidth(int width)
Sets the width. |
|
static void |
toPool(Dim2i dim)
|
|
java.lang.String |
toString()
|
|
Tuple2i |
toTuple()
|
|
|
toTuple(T tuple)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected boolean isDirty
| Constructor Detail |
|---|
public Dim2i(int width,
int height)
width - the rectangle's widthheight - the rectangle's heightpublic Dim2i(Sized2iRO template)
template - public Dim2i()
| Method Detail |
|---|
public final boolean isDirty()
setClean()public void setClean()
public Dim2i setSize(int width,
int height)
setSize in interface Sized2ipublic final void setWidth(int width)
setWidth in interface Sized2ipublic final void setHeight(int height)
setHeight in interface Sized2ipublic final int getWidth()
getWidth in interface Sized2iROpublic final int getHeight()
getHeight in interface Sized2iROpublic final float getAspect()
getAspect in interface Sized2iROpublic final Dim2i setSize(Sized2iRO size)
setSize in interface Sized2ipublic final Dim2i setSize(Tuple2i size)
setSize in interface Sized2ipublic <T extends Tuple2i> T toTuple(T tuple)
public Tuple2i toTuple()
public final Dim2i set(int width,
int height)
width - the rectangle's widthheight - the rectangle's heightpublic final Dim2i set(Sized2iRO size)
size -
public final Dim2i add(int dw,
int dh)
dw - dh - public final Dim2i addW(int dw)
dw - public final Dim2i addH(int dh)
dh -
public final Dim2i scale(int factW,
int factH)
factW - factH - public final Dim2i scaleW(int factW)
factW - public final Dim2i scaleH(int factH)
factH - public boolean equals(Sized2iRO rect)
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic static final Dim2i fromPool()
public static final Dim2i fromPool(int width,
int height)
public static final void toPool(Dim2i dim)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||