Package com.aspose.threed
Class RelativeRectangle
- java.lang.Object
-
- com.aspose.threed.RelativeRectangle
-
- All Implemented Interfaces:
com.aspose.csporter.helpers.Struct<RelativeRectangle>
,java.io.Serializable
,java.lang.Cloneable
public final class RelativeRectangle extends java.lang.Object implements com.aspose.csporter.helpers.Struct<RelativeRectangle>, java.io.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.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RelativeRectangle()
-
Method Summary
Modifier and Type Method Description RelativeRectangle
clone()
void
copyFrom(RelativeRectangle src)
boolean
equals(java.lang.Object obj)
static RelativeRectangle
fromScale(float scaleX, float scaleY, float scaleWidth, float scaleHeight)
Construct aRelativeRectangle
with all offset fields zero and scale fields from given parameters.int
getOffsetHeight()
Gets the offset for heightint
getOffsetWidth()
Gets the offset for widthint
getOffsetX()
Gets the offset for coordinate Xint
getOffsetY()
Gets the offset for coordinate Yfloat
getScaleHeight()
Relative heightfloat
getScaleWidth()
Relative widthfloat
getScaleX()
Relative coordinate Xfloat
getScaleY()
Relative coordinate Yint
hashCode()
void
setOffsetHeight(int value)
Sets the offset for heightvoid
setOffsetWidth(int value)
Sets the offset for widthvoid
setOffsetX(int value)
Sets the offset for coordinate Xvoid
setOffsetY(int value)
Sets the offset for coordinate Yvoid
setScaleHeight(float value)
Relative heightvoid
setScaleWidth(float value)
Relative widthvoid
setScaleX(float value)
Relative coordinate Xvoid
setScaleY(float value)
Relative coordinate Yjava.awt.Rectangle
toAbsolute(java.awt.Dimension rect)
Convert the relative rectangle to absolute rectanglejava.awt.Rectangle
toAbsolute(java.awt.Rectangle rect)
Convert the relative rectangle to absolute rectanglejava.lang.String
toString()
Converts the value of this instance to aString
.
-
-
-
Method Detail
-
getScaleX
public float getScaleX()
Relative coordinate X
-
setScaleX
public void setScaleX(float value)
Relative coordinate X- Parameters:
value
- New value
-
getScaleY
public float getScaleY()
Relative coordinate Y
-
setScaleY
public void setScaleY(float value)
Relative coordinate Y- Parameters:
value
- New value
-
getScaleWidth
public float getScaleWidth()
Relative width
-
setScaleWidth
public void setScaleWidth(float value)
Relative width- Parameters:
value
- New value
-
getScaleHeight
public float getScaleHeight()
Relative height
-
setScaleHeight
public void setScaleHeight(float value)
Relative height- Parameters:
value
- New value
-
getOffsetX
public int getOffsetX()
Gets the offset for coordinate X
-
setOffsetX
public void setOffsetX(int value)
Sets the offset for coordinate X- Parameters:
value
- New value
-
getOffsetY
public int getOffsetY()
Gets the offset for coordinate Y
-
setOffsetY
public void setOffsetY(int value)
Sets the offset for coordinate Y- Parameters:
value
- New value
-
getOffsetWidth
public int getOffsetWidth()
Gets the offset for width
-
setOffsetWidth
public void setOffsetWidth(int value)
Sets the offset for width- Parameters:
value
- New value
-
getOffsetHeight
public int getOffsetHeight()
Gets the offset for height
-
setOffsetHeight
public void setOffsetHeight(int value)
Sets the offset for height- Parameters:
value
- New value
-
toAbsolute
public java.awt.Rectangle toAbsolute(java.awt.Dimension rect)
Convert the relative rectangle to absolute rectangle- Parameters:
rect
-
-
toAbsolute
public java.awt.Rectangle toAbsolute(java.awt.Rectangle rect)
Convert the relative rectangle to absolute rectangle- Parameters:
rect
-
-
fromScale
public static RelativeRectangle fromScale(float scaleX, float scaleY, float scaleWidth, float scaleHeight)
Construct aRelativeRectangle
with all offset fields zero and scale fields from given parameters.- Parameters:
scaleX
-scaleY
-scaleWidth
-scaleHeight
-
-
toString
public java.lang.String toString()
Converts the value of this instance to aString
.- Overrides:
toString
in classjava.lang.Object
-
clone
public RelativeRectangle clone()
- Specified by:
clone
in interfacecom.aspose.csporter.helpers.Struct<RelativeRectangle>
- Overrides:
clone
in classjava.lang.Object
-
copyFrom
public void copyFrom(RelativeRectangle src)
- Specified by:
copyFrom
in interfacecom.aspose.csporter.helpers.Struct<RelativeRectangle>
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-