com.thebuzzmedia.imgscalr
Enum Scalr.Rotation

java.lang.Object
  extended by java.lang.Enum<Scalr.Rotation>
      extended by com.thebuzzmedia.imgscalr.Scalr.Rotation
All Implemented Interfaces:
Serializable, Comparable<Scalr.Rotation>
Enclosing class:
Scalr

public static enum Scalr.Rotation
extends Enum<Scalr.Rotation>

Used to define the different types of rotations that can be applied to an image during a resize operation.


Enum Constant Summary
CLOCKWISE
          Rotate the image 90-degrees clockwise (to the right).
COUNTER_CLOCKWISE
          Rotate the image negative 90-degrees counter-clockwise (to the left).
FLIP
          Flip the image.
NONE
          No rotation should be applied to the image.
 
Method Summary
static Scalr.Rotation valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Scalr.Rotation[] 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, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

NONE

public static final Scalr.Rotation NONE
No rotation should be applied to the image.


CLOCKWISE

public static final Scalr.Rotation CLOCKWISE
Rotate the image 90-degrees clockwise (to the right). This is equivalent to a quarter-turn of the image to the right.


COUNTER_CLOCKWISE

public static final Scalr.Rotation COUNTER_CLOCKWISE
Rotate the image negative 90-degrees counter-clockwise (to the left). This is equivalent to a quarter-turn of the image to the left. This is also equivalent to a 270-degree rotation to the right.


FLIP

public static final Scalr.Rotation FLIP
Flip the image. This is equivalent to rotating an image 180 degrees (right or left, it doesn't matter).

Method Detail

values

public static Scalr.Rotation[] 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 (Scalr.Rotation c : Scalr.Rotation.values())
    System.out.println(c);

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

valueOf

public static Scalr.Rotation 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

Copyright 2011 The Buzz Media, LLC