Enum Class ImageScaleMode

java.lang.Object
java.lang.Enum<ImageScaleMode>
de.gurkenlabs.litiengine.gui.ImageScaleMode
All Implemented Interfaces:
Serializable, Comparable<ImageScaleMode>, Constable

public enum ImageScaleMode extends Enum<ImageScaleMode>
Enum representing different modes for scaling images.
  • Enum Constant Details

    • NORMAL

      public static final ImageScaleMode NORMAL
      No scaling is applied to the image.
    • STRETCH

      public static final ImageScaleMode STRETCH
      The image is stretched to fill the available space.
    • FIT

      public static final ImageScaleMode FIT
      The image is scaled to fit within the available space while maintaining its aspect ratio.
    • SLICE

      public static final ImageScaleMode SLICE
      The image is scaled and cropped to fill the available space while maintaining its aspect ratio.
  • Method Details

    • values

      public static ImageScaleMode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ImageScaleMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null