Package
Class
Use
Tree
Deprecated
Index
All Classes
Help
Prev Class
Next Class
VTypes - Release 1
Class org.violetlib.types.ScalingOption
Inherited members: ShowHide
Deprecated: ShowHide
org.violetlib.types

Class ScalingOption

  • Object
    • ScalingOption
  • public class ScalingOption extends Object
    Options for scaling a shape to fit in a given display size or to magnify it by a fixed scale factor.
    • Fields 
      Modifier and Type Field and Description
      Ordinary member indicator ACTUAL_SIZE Reveal DetailHide Detail
      static ScalingOption ACTUAL_SIZE
      Do not scale the shape.
      public static final ScalingOption ACTUAL_SIZE
      Do not scale the shape. Always display it at full resolution, regardless of whether it fits or not.
      Ordinary member indicator SCALE_FREE Reveal DetailHide Detail
      static ScalingOption SCALE_FREE
      Scale the shape to fit exactly within the available space.
      public static final ScalingOption SCALE_FREE
      Scale the shape to fit exactly within the available space.
      Ordinary member indicator SCALE_PRESERVE Reveal DetailHide Detail
      static ScalingOption SCALE_PRESERVE
      Scale the shape to fit within the available space, but preserve the aspect ratio.
      public static final ScalingOption SCALE_PRESERVE
      Scale the shape to fit within the available space, but preserve the aspect ratio.
      Ordinary member indicator SCALE_PRESERVE_REDUCE Reveal DetailHide Detail
      static ScalingOption SCALE_PRESERVE_REDUCE
      Scale the shape to fit within the available space, but preserve the aspect ratio and do not enlarge the shape.
      public static final ScalingOption SCALE_PRESERVE_REDUCE
      Scale the shape to fit within the available space, but preserve the aspect ratio and do not enlarge the shape.
    • Static Methods 
      Modifier and Type Static Method and Description
      Ordinary member indicator fixed Reveal DetailHide Detail
      static ScalingOption fixed(double scaleFactor)
      Create an option to scale by a fixed scale factor.
      public static ScalingOption fixed(double scaleFactor) throws IllegalArgumentException
      Create an option to scale by a fixed scale factor.
      Parameters:
      scaleFactor - The scale factor.
      Throws:
      IllegalArgumentException - if the scale factor is zero or negative.
    • Methods 
      Modifier and Type Method and Description
      Ordinary member indicator getScaleFactor Reveal DetailHide Detail
      double getScaleFactor()
      If this scaling option corresponds to a specified scale factor, return the scale factor.
      public double getScaleFactor()
      If this scaling option corresponds to a specified scale factor, return the scale factor.
      Returns:
      the scale factor, or zero if this scaling option does not correspond to a specified scale factor.
      Ordinary member indicator isSpecified Reveal DetailHide Detail
      boolean isSpecified()
      Return true if and only if this scaling option corresponds to a specified scale factor.
      public boolean isSpecified()
      Return true if and only if this scaling option corresponds to a specified scale factor.
      Overridden member indicator toString Reveal DetailHide Detail
      String toString()
       
      public String toString()
      • Methods inherited from class Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait