Enum Class ContentFit

java.lang.Object
java.lang.Enum<ContentFit>
org.gnome.gtk.ContentFit
All Implemented Interfaces:
Serializable, Comparable<ContentFit>, Constable, Enumeration

@Generated("org.javagi.JavaGI") public enum ContentFit extends Enum<ContentFit> implements Enumeration
Controls how a content should be made to fit inside an allocation.
Since:
4.8
  • Nested Class Summary

    Nested classes/interfaces inherited from class Enum

    Enum.EnumDesc<E>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Scale the content to fit the allocation, while taking its aspect ratio in consideration.
    Cover the entire allocation, while taking the content aspect ratio in consideration.
    Make the content fill the entire allocation, without taking its aspect ratio in consideration.
    The content is scaled down to fit the allocation, if needed, otherwise its original size is used.
  • Method Summary

    Modifier and Type
    Method
    Description
    static @Nullable Type
    Get the GType of the ContentFit class.
    int
    Get the numeric value of this enum
    static ContentFit
    of(int value)
    Create a new ContentFit for the provided value
    static ContentFit
    of(MemorySegment address)
    Create a new ContentFit for the value in the provided memory address.
    static ContentFit
    Returns the enum constant of this class with the specified name.
    static ContentFit[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • FILL

      public static final ContentFit FILL
      Make the content fill the entire allocation, without taking its aspect ratio in consideration. The resulting content will appear as stretched if its aspect ratio is different from the allocation aspect ratio.
    • CONTAIN

      public static final ContentFit CONTAIN
      Scale the content to fit the allocation, while taking its aspect ratio in consideration. The resulting content will appear as letterboxed if its aspect ratio is different from the allocation aspect ratio.
    • COVER

      public static final ContentFit COVER
      Cover the entire allocation, while taking the content aspect ratio in consideration. The resulting content will appear as clipped if its aspect ratio is different from the allocation aspect ratio.
    • SCALE_DOWN

      public static final ContentFit SCALE_DOWN
      The content is scaled down to fit the allocation, if needed, otherwise its original size is used.
  • Method Details

    • values

      public static ContentFit[] 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 ContentFit 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
    • of

      public static ContentFit of(int value)
      Create a new ContentFit for the provided value
      Parameters:
      value - the enum value
      Returns:
      the enum for the provided value
    • getValue

      public int getValue()
      Get the numeric value of this enum
      Specified by:
      getValue in interface Enumeration
      Returns:
      the enum value
    • of

      public static ContentFit of(MemorySegment address)
      Create a new ContentFit for the value in the provided memory address.
      Parameters:
      address - the memory address holding a enum value
      Returns:
      the enum for the value in the provided memory address
    • getType

      public static @Nullable Type getType()
      Get the GType of the ContentFit class.
      Returns:
      the GType