Enum EPromptImageObjectFit

java.lang.Object
java.lang.Enum<EPromptImageObjectFit>
de.xima.fc.prompt.service.support.EPromptImageObjectFit
All Implemented Interfaces:
Serializable, Comparable<EPromptImageObjectFit>

public enum EPromptImageObjectFit extends Enum<EPromptImageObjectFit>
The object-fit property defines how an image should be resized to fit its canvas.
Since:
8.5.0
  • Enum Constant Details

    • CONTAIN

      public static final EPromptImageObjectFit CONTAIN
      The image is scaled to maintain its aspect ratio while fitting within the canvas box. The entire image is made to fill the canvas, while preserving its aspect ratio, so the image will be "letterboxed" or "pillarboxed" if its aspect ratio does not match the aspect ratio of the box.
    • COVER

      public static final EPromptImageObjectFit COVER
      The image is sized to maintain its aspect ratio while filling the entire canvas. If the image's aspect ratio does not match the aspect ratio of its box, then the image will be clipped to fit.
    • FILL

      public static final EPromptImageObjectFit FILL
      The image is sized to fill the canvas. The entire image will completely fill the box. If the image's aspect ratio does not match the aspect ratio of its canvas, then the image will be stretched to fit.
    • NONE

      public static final EPromptImageObjectFit NONE
      The image is not resized and centered within the canvas.
    • SCALE_DOWN

      public static final EPromptImageObjectFit SCALE_DOWN
      The image is sized as if NONE or CONTAIN were specified, whichever would result in a smaller concrete image size.
  • Method Details

    • values

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

      public static EPromptImageObjectFit valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
      NullPointerException - if the argument is null