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

ConstructorDescription
RelativeRectangle(int left, int top, int width, int height)Construct a RelativeRectangle
RelativeRectangle()

Methods

MethodDescription
clone()
copyFrom(RelativeRectangle src)
equals(Object obj)
fromScale(float scaleX, float scaleY, float scaleWidth, float scaleHeight)Construct a RelativeRectangle with all offset fields zero and scale fields from given parameters.
getClass()
getOffsetHeight()Gets the offset for height
getOffsetWidth()Gets the offset for width
getOffsetX()Gets the offset for coordinate X
getOffsetY()Gets the offset for coordinate Y
getScaleHeight()Relative height
getScaleWidth()Relative width
getScaleX()Relative coordinate X
getScaleY()Relative coordinate Y
hashCode()
notify()
notifyAll()
setOffsetHeight(int value)Sets the offset for height
setOffsetWidth(int value)Sets the offset for width
setOffsetX(int value)Sets the offset for coordinate X
setOffsetY(int value)Sets the offset for coordinate Y
setScaleHeight(float value)Relative height
setScaleWidth(float value)Relative width
setScaleX(float value)Relative coordinate X
setScaleY(float value)Relative coordinate Y
toAbsolute(int left, int top, int width, int height)Convert the relative rectangle to absolute rectangle
toString()Converts the value of this instance to a java.lang.String.
wait()
wait(long arg0)
wait(long arg0, int arg1)

RelativeRectangle(int left, int top, int width, int height)

public RelativeRectangle(int left, int top, int width, int height)

Construct a RelativeRectangle

Parameters:

ParameterTypeDescription
leftint
topint
widthint
heightint

RelativeRectangle()

public RelativeRectangle()

clone()

public RelativeRectangle clone()

Returns: RelativeRectangle

copyFrom(RelativeRectangle src)

public void copyFrom(RelativeRectangle src)

Parameters:

ParameterTypeDescription
srcRelativeRectangle

equals(Object obj)

public boolean equals(Object obj)

Parameters:

ParameterTypeDescription
objjava.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:

ParameterTypeDescription
scaleXfloat
scaleYfloat
scaleWidthfloat
scaleHeightfloat

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:

ParameterTypeDescription
valueintNew value

setOffsetWidth(int value)

public void setOffsetWidth(int value)

Sets the offset for width

Parameters:

ParameterTypeDescription
valueintNew value

setOffsetX(int value)

public void setOffsetX(int value)

Sets the offset for coordinate X

Parameters:

ParameterTypeDescription
valueintNew value

setOffsetY(int value)

public void setOffsetY(int value)

Sets the offset for coordinate Y

Parameters:

ParameterTypeDescription
valueintNew value

setScaleHeight(float value)

public void setScaleHeight(float value)

Relative height

Parameters:

ParameterTypeDescription
valuefloatNew value

setScaleWidth(float value)

public void setScaleWidth(float value)

Relative width

Parameters:

ParameterTypeDescription
valuefloatNew value

setScaleX(float value)

public void setScaleX(float value)

Relative coordinate X

Parameters:

ParameterTypeDescription
valuefloatNew value

setScaleY(float value)

public void setScaleY(float value)

Relative coordinate Y

Parameters:

ParameterTypeDescription
valuefloatNew 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:

ParameterTypeDescription
leftintLeft of the rectangle
topintTop of the rectangle
widthintWidth of the rectangle
heightintHeight 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:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int