Loading


android.graphics
Enum PorterDuff.Mode

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

public static enum PorterDuff.Mode
extends java.lang.Enum<PorterDuff.Mode>


Enum Constant Summary
CLEAR
          [0, 0]
DARKEN
          [Sa + Da - Sa*Da, Sc*(1 - Da) + Dc*(1 - Sa) + min(Sc, Dc)]
DST
          [Da, Dc]
DST_ATOP
          [Sa, Sa * Dc + Sc * (1 - Da)]
DST_IN
          [Sa * Da, Sa * Dc]
DST_OUT
          [Da * (1 - Sa), Dc * (1 - Sa)]
DST_OVER
          [Sa + (1 - Sa)*Da, Rc = Dc + (1 - Da)*Sc]
LIGHTEN
          [Sa + Da - Sa*Da, Sc*(1 - Da) + Dc*(1 - Sa) + max(Sc, Dc)]
MULTIPLY
          [Sa * Da, Sc * Dc]
SCREEN
          [Sa + Da - Sa * Da, Sc + Dc - Sc * Dc]
SRC
          [Sa, Sc]
SRC_ATOP
          [Da, Sc * Da + (1 - Sa) * Dc]
SRC_IN
          [Sa * Da, Sc * Da]
SRC_OUT
          [Sa * (1 - Da), Sc * (1 - Da)]
SRC_OVER
          [Sa + (1 - Sa)*Da, Rc = Sc + (1 - Sa)*Dc]
XOR
          [Sa + Da - 2 * Sa * Da, Sc * (1 - Da) + (1 - Sa) * Dc]
 
Field Summary
(package private)  int nativeInt
           
 
Method Summary
static PorterDuff.Mode valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static PorterDuff.Mode[] 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

CLEAR

public static final PorterDuff.Mode CLEAR
[0, 0]


SRC

public static final PorterDuff.Mode SRC
[Sa, Sc]


DST

public static final PorterDuff.Mode DST
[Da, Dc]


SRC_OVER

public static final PorterDuff.Mode SRC_OVER
[Sa + (1 - Sa)*Da, Rc = Sc + (1 - Sa)*Dc]


DST_OVER

public static final PorterDuff.Mode DST_OVER
[Sa + (1 - Sa)*Da, Rc = Dc + (1 - Da)*Sc]


SRC_IN

public static final PorterDuff.Mode SRC_IN
[Sa * Da, Sc * Da]


DST_IN

public static final PorterDuff.Mode DST_IN
[Sa * Da, Sa * Dc]


SRC_OUT

public static final PorterDuff.Mode SRC_OUT
[Sa * (1 - Da), Sc * (1 - Da)]


DST_OUT

public static final PorterDuff.Mode DST_OUT
[Da * (1 - Sa), Dc * (1 - Sa)]


SRC_ATOP

public static final PorterDuff.Mode SRC_ATOP
[Da, Sc * Da + (1 - Sa) * Dc]


DST_ATOP

public static final PorterDuff.Mode DST_ATOP
[Sa, Sa * Dc + Sc * (1 - Da)]


XOR

public static final PorterDuff.Mode XOR
[Sa + Da - 2 * Sa * Da, Sc * (1 - Da) + (1 - Sa) * Dc]


DARKEN

public static final PorterDuff.Mode DARKEN
[Sa + Da - Sa*Da, Sc*(1 - Da) + Dc*(1 - Sa) + min(Sc, Dc)]


LIGHTEN

public static final PorterDuff.Mode LIGHTEN
[Sa + Da - Sa*Da, Sc*(1 - Da) + Dc*(1 - Sa) + max(Sc, Dc)]


MULTIPLY

public static final PorterDuff.Mode MULTIPLY
[Sa * Da, Sc * Dc]


SCREEN

public static final PorterDuff.Mode SCREEN
[Sa + Da - Sa * Da, Sc + Dc - Sc * Dc]

Field Detail

nativeInt

final int nativeInt
Method Detail

values

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

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

valueOf

public static PorterDuff.Mode valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null