Build 1.0_r1(from source)

android.graphics
Enum Matrix.ScaleToFit

java.lang.Object
  extended by java.lang.Enum<Matrix.ScaleToFit>
      extended by android.graphics.Matrix.ScaleToFit
All Implemented Interfaces:
Serializable, Comparable<Matrix.ScaleToFit>
Enclosing class:
Matrix

public static enum Matrix.ScaleToFit
extends Enum<Matrix.ScaleToFit>

Controlls how the src rect should align into the dst rect for setRectToRect().


Enum Constant Summary
CENTER
          Compute a scale that will maintain the original src aspect ratio, but will also ensure that src fits entirely inside dst.
END
          Compute a scale that will maintain the original src aspect ratio, but will also ensure that src fits entirely inside dst.
FILL
          Scale in X and Y independently, so that src matches dst exactly.
START
          Compute a scale that will maintain the original src aspect ratio, but will also ensure that src fits entirely inside dst.
 
Field Summary
(package private)  int nativeInt
           
 
Method Summary
static Matrix.ScaleToFit valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Matrix.ScaleToFit[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

FILL

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


START

public static final Matrix.ScaleToFit 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.


CENTER

public static final Matrix.ScaleToFit 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.


END

public static final Matrix.ScaleToFit 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.

Field Detail

nativeInt

final int nativeInt
Method Detail

values

public static Matrix.ScaleToFit[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Matrix.ScaleToFit c : Matrix.ScaleToFit.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Matrix.ScaleToFit 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

Build 1.0_r1(from source)

Please submit a feedback, bug or feature