public final class RelativeRectangle extends java.lang.Object implements Struct<RelativeRectangle>, java.io.Serializable
| Constructor and Description |
|---|
RelativeRectangle() |
RelativeRectangle(int left,
int top,
int width,
int height)
Construct a
RelativeRectangle |
| Modifier and Type | Method and Description |
|---|---|
RelativeRectangle |
clone()
Clone current instance
|
void |
copyFrom(RelativeRectangle src)
Copy internal state from argument t
|
boolean |
equals(java.lang.Object obj) |
static RelativeRectangle |
fromScale(float scaleX,
float scaleY,
float scaleWidth,
float scaleHeight)
Construct a
RelativeRectangle with all offset fields zero and scale fields from given parameters. |
int |
getOffsetHeight()
Gets the offset for height
|
int |
getOffsetWidth()
Gets the offset for width
|
int |
getOffsetX()
Gets the offset for coordinate X
|
int |
getOffsetY()
Gets the offset for coordinate Y
|
float |
getScaleHeight()
Relative height
|
float |
getScaleWidth()
Relative width
|
float |
getScaleX()
Relative coordinate X
|
float |
getScaleY()
Relative coordinate Y
|
int |
hashCode() |
void |
setOffsetHeight(int value)
Sets the offset for height
|
void |
setOffsetWidth(int value)
Sets the offset for width
|
void |
setOffsetX(int value)
Sets the offset for coordinate X
|
void |
setOffsetY(int value)
Sets the offset for coordinate Y
|
void |
setScaleHeight(float value)
Relative height
|
void |
setScaleWidth(float value)
Relative width
|
void |
setScaleX(float value)
Relative coordinate X
|
void |
setScaleY(float value)
Relative coordinate Y
|
Rect |
toAbsolute(int left,
int top,
int width,
int height)
Convert the relative rectangle to absolute rectangle
|
java.lang.String |
toString()
Converts the value of this instance to a
String. |
public RelativeRectangle(int left,
int top,
int width,
int height)
RelativeRectanglepublic RelativeRectangle()
public float getScaleX()
public void setScaleX(float value)
value - New valuepublic float getScaleY()
public void setScaleY(float value)
value - New valuepublic float getScaleWidth()
public void setScaleWidth(float value)
value - New valuepublic float getScaleHeight()
public void setScaleHeight(float value)
value - New valuepublic int getOffsetX()
public void setOffsetX(int value)
value - New valuepublic int getOffsetY()
public void setOffsetY(int value)
value - New valuepublic int getOffsetWidth()
public void setOffsetWidth(int value)
value - New valuepublic int getOffsetHeight()
public void setOffsetHeight(int value)
value - New valuepublic Rect toAbsolute(int left, int top, int width, int height)
left - Left of the rectangletop - Top of the rectanglewidth - Width of the rectangleheight - Height of the rectanglepublic static RelativeRectangle fromScale(float scaleX, float scaleY, float scaleWidth, float scaleHeight)
RelativeRectangle with all offset fields zero and scale fields from given parameters.public java.lang.String toString()
String.toString in class java.lang.Objectpublic RelativeRectangle clone()
Structclone in interface Struct<RelativeRectangle>clone in class java.lang.Objectpublic void copyFrom(RelativeRectangle src)
StructcopyFrom in interface Struct<RelativeRectangle>src - source instance to copypublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object