RelativeRectangle
Inheritance: java.lang.Object
All Implemented Interfaces: com.aspose.csporter.helpers.Struct, java.io.Serializable
public final class RelativeRectangle implements Struct<RelativeRectangle>, Serializable
Relative rectangle The formula between relative component to absolute value is: Scale * (Reference Width) + offset So if we want it to represent an absolute value, leave all scale fields zero, and use offset fields instead.
Constructors
Constructor | Description |
---|---|
RelativeRectangle(int left, int top, int width, int height) | Construct a RelativeRectangle |
RelativeRectangle() |
Methods
RelativeRectangle(int left, int top, int width, int height)
public RelativeRectangle(int left, int top, int width, int height)
Construct a RelativeRectangle
Parameters:
Parameter | Type | Description |
---|---|---|
left | int | |
top | int | |
width | int | |
height | int |
RelativeRectangle()
public RelativeRectangle()
clone()
public RelativeRectangle clone()
Returns: RelativeRectangle
copyFrom(RelativeRectangle src)
public void copyFrom(RelativeRectangle src)
Parameters:
Parameter | Type | Description |
---|---|---|
src | RelativeRectangle |
equals(Object obj)
public boolean equals(Object obj)
Parameters:
Parameter | Type | Description |
---|---|---|
obj | java.lang.Object |
Returns: boolean
fromScale(float scaleX, float scaleY, float scaleWidth, float scaleHeight)
public 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.
Parameters:
Parameter | Type | Description |
---|---|---|
scaleX | float | |
scaleY | float | |
scaleWidth | float | |
scaleHeight | float |
Returns: RelativeRectangle
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
getOffsetHeight()
public int getOffsetHeight()
Gets the offset for height
Returns: int
getOffsetWidth()
public int getOffsetWidth()
Gets the offset for width
Returns: int
getOffsetX()
public int getOffsetX()
Gets the offset for coordinate X
Returns: int
getOffsetY()
public int getOffsetY()
Gets the offset for coordinate Y
Returns: int
getScaleHeight()
public float getScaleHeight()
Relative height
Returns: float
getScaleWidth()
public float getScaleWidth()
Relative width
Returns: float
getScaleX()
public float getScaleX()
Relative coordinate X
Returns: float
getScaleY()
public float getScaleY()
Relative coordinate Y
Returns: float
hashCode()
public int hashCode()
Returns: int
notify()
public final native void notify()
notifyAll()
public final native void notifyAll()
setOffsetHeight(int value)
public void setOffsetHeight(int value)
Sets the offset for height
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | New value |
setOffsetWidth(int value)
public void setOffsetWidth(int value)
Sets the offset for width
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | New value |
setOffsetX(int value)
public void setOffsetX(int value)
Sets the offset for coordinate X
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | New value |
setOffsetY(int value)
public void setOffsetY(int value)
Sets the offset for coordinate Y
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | New value |
setScaleHeight(float value)
public void setScaleHeight(float value)
Relative height
Parameters:
Parameter | Type | Description |
---|---|---|
value | float | New value |
setScaleWidth(float value)
public void setScaleWidth(float value)
Relative width
Parameters:
Parameter | Type | Description |
---|---|---|
value | float | New value |
setScaleX(float value)
public void setScaleX(float value)
Relative coordinate X
Parameters:
Parameter | Type | Description |
---|---|---|
value | float | New value |
setScaleY(float value)
public void setScaleY(float value)
Relative coordinate Y
Parameters:
Parameter | Type | Description |
---|---|---|
value | float | New value |
toAbsolute(int left, int top, int width, int height)
public Rect toAbsolute(int left, int top, int width, int height)
Convert the relative rectangle to absolute rectangle
Parameters:
Parameter | Type | Description |
---|---|---|
left | int | Left of the rectangle |
top | int | Top of the rectangle |
width | int | Width of the rectangle |
height | int | Height of the rectangle |
Returns: Rect
toString()
public String toString()
Converts the value of this instance to a java.lang.String.
Returns: java.lang.String
wait()
public final void wait()
wait(long arg0)
public final void wait(long arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long | |
arg1 | int |