Package icyllis.modernui.widget

# Enum Class ImageView.ScaleType

java.lang.Object
java.lang.Enum<ImageView.ScaleType>
icyllis.modernui.widget.ImageView.ScaleType

All Implemented Interfaces:
  `Serializable`, `Comparable<ImageView.ScaleType>`, `Constable`

Enclosing class:
  `ImageView`

public static enum ImageView.ScaleType extends Enum<ImageView.ScaleType>
Options for scaling the bounds of an image to the bounds of this view.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class java.lang.Enum

  `Enum.EnumDesc<E extends Enum<E>>`

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `CENTER`
  Center the image in the view, but perform no scaling.
  `CENTER_CROP`
  Scale the image uniformly (maintain the image's aspect ratio) so that both dimensions (width and height) of the image will be equal to or larger than the corresponding dimension of the view (minus padding).
  `CENTER_INSIDE`
  Scale the image uniformly (maintain the image's aspect ratio) so that both dimensions (width and height) of the image will be equal to or less than the corresponding dimension of the view (minus padding).
  `FIT_CENTER`
  Compute a scale that will maintain the original src aspect ratio, but will also ensure that src fits entirely inside dst.
  `FIT_END`
  Compute a scale that will maintain the original src aspect ratio, but will also ensure that src fits entirely inside dst.
  `FIT_START`
  Compute a scale that will maintain the original src aspect ratio, but will also ensure that src fits entirely inside dst.
  `FIT_XY`
  Scale in X and Y independently, so that src matches dst exactly.
  `MATRIX`
  Scale using the image matrix when drawing.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static ImageView.ScaleType`
  `valueOf(String name)`
  Returns the enum constant of this class with the specified name.
  `static ImageView.ScaleType[]`
  `values()`
  Returns an array containing the constants of this enum class, in the order they are declared.

  ### Methods inherited from class java.lang.Enum

  `clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

  ### Methods inherited from class java.lang.Object

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Enum Constant Details

  - ### MATRIX

    public static final ImageView.ScaleType MATRIX
    Scale using the image matrix when drawing. The image matrix can be set using `ImageView.setImageMatrix(Matrix)`.

  - ### FIT_XY

    public static final ImageView.ScaleType FIT_XY
    Scale in X and Y independently, so that src matches dst exactly. This may change the aspect ratio of the src.

  - ### FIT_START

    public static final ImageView.ScaleType FIT_START
    Compute a scale that will maintain the original src aspect ratio, but will also ensure that src fits entirely inside dst. At least one axis (X or Y) will fit exactly. START aligns the result to the left and top edges of dst.

  - ### FIT_CENTER

    public static final ImageView.ScaleType FIT_CENTER
    Compute a scale that will maintain the original src aspect ratio, but will also ensure that src fits entirely inside dst. At least one axis (X or Y) will fit exactly. The result is centered inside dst.

  - ### FIT_END

    public static final ImageView.ScaleType FIT_END
    Compute a scale that will maintain the original src aspect ratio, but will also ensure that src fits entirely inside dst. At least one axis (X or Y) will fit exactly. END aligns the result to the right and bottom edges of dst.

  - ### CENTER

    public static final ImageView.ScaleType CENTER
    Center the image in the view, but perform no scaling.

  - ### CENTER_CROP

    public static final ImageView.ScaleType CENTER_CROP
    Scale the image uniformly (maintain the image's aspect ratio) so that both dimensions (width and height) of the image will be equal to or larger than the corresponding dimension of the view (minus padding). The image is then centered in the view.

  - ### CENTER_INSIDE

    public static final ImageView.ScaleType CENTER_INSIDE
    Scale the image uniformly (maintain the image's aspect ratio) so that both dimensions (width and height) of the image will be equal to or less than the corresponding dimension of the view (minus padding). The image is then centered in the view.

- ## Method Details

  - ### values

    public static ImageView.ScaleType[] 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 ImageView.ScaleType 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