com.aspose.threed

Interfaces

Classes

Enums

Exceptions

com.aspose.threed

Class RelativeRectangle

  • java.lang.Object
    • com.aspose.threed.RelativeRectangle
  • All Implemented Interfaces:
    com.aspose.threed.Struct<RelativeRectangle>, java.io.Serializable, java.lang.Cloneable


    public final class RelativeRectangle
    extends java.lang.Object
    implements com.aspose.threed.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 Detail

      • RelativeRectangle

        public RelativeRectangle()
    • 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 a RelativeRectangle 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 a String.
        Overrides:
        toString in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object