Class AspectRatio


  • public class AspectRatio
    extends java.lang.Object
    Aspect ratio is the ratio of the width to the height of an image or screen.
    • Constructor Summary

      Constructors 
      Constructor Description
      AspectRatio()
      Constructs AspectRatio with default parameters.
      AspectRatio​(double width, double height)
      Constructs AspectRatio with the given params.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double getHeight()
      Getter for height field.
      double getWidth()
      Getter for width field.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AspectRatio

        public AspectRatio​(double width,
                           double height)
        Constructs AspectRatio with the given params.
        Parameters:
        width - Width component of the aspect ratio. Default is 1.0
        height - Height component of the aspect ratio. Default is 1.0
      • AspectRatio

        public AspectRatio()
        Constructs AspectRatio with default parameters.
    • Method Detail

      • getWidth

        public double getWidth()
        Getter for width field. See constructor documentation for more information about the field.
        Returns:
        width
      • getHeight

        public double getHeight()
        Getter for height field. See constructor documentation for more information about the field.
        Returns:
        height