# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Enums | Methods | Inherited Methods

# BlendMode

`public final enum BlendMode`
`` `extends Enum<BlendMode>` ``

java.lang.Object
↳ | java.lang.Enum<android.graphics.BlendMode>
| ↳ | android.graphics.BlendMode

## Summary

### Enum values
`BlendMode` | `CLEAR` Destination pixels covered by the source are cleared to 0.
`BlendMode` | `COLOR` Replaces hue and saturation of destination with hue and saturation of source, leaving luminosity unchanged.
`BlendMode` | `COLOR_BURN` Makes destination darker to reflect source.
`BlendMode` | `COLOR_DODGE` Makes destination brighter to reflect source.
`BlendMode` | `DARKEN` Retains the smallest component of the source and destination pixels.
`BlendMode` | `DIFFERENCE` Subtracts darker from lighter with higher contrast.
`BlendMode` | `DST` The source pixels are discarded, leaving the destination intact.
`BlendMode` | `DST_ATOP` Discards the destination pixels that are not covered by source pixels.
`BlendMode` | `DST_IN` Keeps the destination pixels that cover source pixels, discards the remaining source and destination pixels.
`BlendMode` | `DST_OUT` Keeps the destination pixels that are not covered by source pixels.
`BlendMode` | `DST_OVER` The source pixels are drawn behind the destination pixels.
`BlendMode` | `EXCLUSION` Subtracts darker from lighter with lower contrast.
`BlendMode` | `HARD_LIGHT` Makes destination lighter or darker, depending on source.
`BlendMode` | `HUE` Replaces hue of destination with hue of source, leaving saturation and luminosity unchanged.
`BlendMode` | `LIGHTEN` Retains the largest component of the source and destination pixel.
`BlendMode` | `LUMINOSITY` Replaces luminosity of destination with luminosity of source, leaving hue and saturation unchanged.
`BlendMode` | `MODULATE` Multiplies the source and destination pixels.
`BlendMode` | `MULTIPLY` Multiplies the source and destination pixels.
`BlendMode` | `OVERLAY` Multiplies or screens the source and destination depending on the destination color.
`BlendMode` | `PLUS` Adds the source pixels to the destination pixels and saturates the result.
`BlendMode` | `SATURATION` Replaces saturation of destination saturation hue of source, leaving hue and luminosity unchanged.
`BlendMode` | `SCREEN` Adds the source and destination pixels, then subtracts the source pixels multiplied by the destination.
`BlendMode` | `SOFT_LIGHT` Makes destination lighter or darker, depending on source.
`BlendMode` | `SRC` The source pixels replace the destination pixels.
`BlendMode` | `SRC_ATOP` Discards the source pixels that do not cover destination pixels.
`BlendMode` | `SRC_IN` Keeps the source pixels that cover the destination pixels, discards the remaining source and destination pixels.
`BlendMode` | `SRC_OUT` Keeps the source pixels that do not cover destination pixels.
`BlendMode` | `SRC_OVER` The source pixels are drawn over the destination pixels.
`BlendMode` | `XOR` Discards the source and destination pixels where source pixels cover destination pixels.

### Public methods
`static BlendMode` | `valueOf(String name)`
`static final BlendMode[]` | `values()`

### Inherited methods
From class `java.lang.Enum`
`final Object` | `clone()` Throws CloneNotSupportedException.
`final int` | `compareTo(E o)` Compares this enum with the specified object for order.
`final boolean` | `equals(Object other)` Returns true if the specified object is equal to this enum constant.
`final void` | `finalize()` enum classes cannot have finalize methods.
`final Class<E>` | `getDeclaringClass()` Returns the Class object corresponding to this enum constant's enum type.
`final int` | `hashCode()` Returns a hash code for this enum constant.
`final String` | `name()` Returns the name of this enum constant, exactly as declared in its enum declaration.
`final int` | `ordinal()` Returns the ordinal of this enumeration constant (its position in its enum declaration, where the initial constant is assigned an ordinal of zero).
`String` | `toString()` Returns the name of this enum constant, as contained in the declaration.
`static <T extends Enum<T>> T` | `valueOf(Class<T> enumType, String name)` Returns the enum constant of the specified enum type with the specified name.
From class `java.lang.Object`
`Object` | `clone()` Creates and returns a copy of this object.
`boolean` | `equals(Object obj)` Indicates whether some other object is "equal to" this one.
`void` | `finalize()` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
`final Class<?>` | `getClass()` Returns the runtime class of this `Object`.
`int` | `hashCode()` Returns a hash code value for the object.
`final void` | `notify()` Wakes up a single thread that is waiting on this object's monitor.
`final void` | `notifyAll()` Wakes up all threads that are waiting on this object's monitor.
`String` | `toString()` Returns a string representation of the object.
`final void` | `wait(long timeout, int nanos)` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
`final void` | `wait(long timeout)` Causes the current thread to wait until either another thread invokes the `notify()` method or the `notifyAll()` method for this object, or a specified amount of time has elapsed.
`final void` | `wait()` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object.
From interface `java.lang.Comparable`
`abstract int` | `compareTo(E o)` Compares this object with the specified object for order.

## Enum values

### CLEAR

    public static final BlendMode CLEAR

Destination pixels covered by the source are cleared to 0.

\(\alpha_{out} = 0\)

\(C_{out} = 0\)

### COLOR

    public static final BlendMode COLOR

Replaces hue and saturation of destination with hue and saturation of source, leaving luminosity unchanged.

### COLOR_BURN

    public static final BlendMode COLOR_BURN

Makes destination darker to reflect source.

\(\alpha_{out} = \alpha_{src} + \alpha_{dst} - \alpha_{src} * \alpha_{dst}\)

\begin{equation} C_{out} = \begin{cases} C_{dst} + C_{src}*(1 - \alpha_{dst}) & C_{dst} = \alpha_{dst} \\ \alpha_{dst}*(1 - \alpha_{src}) & C_{src} = 0 \\ \alpha_{src}*(\alpha_{dst} - min(\alpha_{dst}, (\alpha_{dst} - C_{dst})*\alpha_{src}/C_{src})) + C_{src} * (1 - \alpha_{dst}) + \alpha_{dst}*(1-\alpha_{src}) & otherwise \end{cases} \end{equation}

### COLOR_DODGE

    public static final BlendMode COLOR_DODGE

Makes destination brighter to reflect source.

\(\alpha_{out} = \alpha_{src} + \alpha_{dst} - \alpha_{src} * \alpha_{dst}\)

\begin{equation} C_{out} = \begin{cases} C_{src} * (1 - \alpha_{dst}) & C_{dst} = 0 \\ C_{src} + \alpha_{dst}*(1 - \alpha_{src}) & C_{src} = \alpha_{src} \\ \alpha_{src} * min(\alpha_{dst}, C_{dst} * \alpha_{src}/(\alpha_{src} - C_{src})) + C_{src} *(1 - \alpha_{dst} + \alpha_{dst}*(1 - \alpha_{src}) & otherwise \end{cases} \end{equation}

### DARKEN

    public static final BlendMode DARKEN

Retains the smallest component of the source and destination pixels.

\(\alpha_{out} = \alpha_{src} + \alpha_{dst} - \alpha_{src} * \alpha_{dst}\)

\(C_{out} = (1 - \alpha_{dst}) * C_{src} + (1 - \alpha_{src}) * C_{dst} + min(C_{src}, C_{dst})\)

### DIFFERENCE

    public static final BlendMode DIFFERENCE

Subtracts darker from lighter with higher contrast.

\begin{equation} \alpha_{out} = \alpha_{src} + \alpha_{dst} - \alpha_{src} * \alpha_{dst} \end{equation}

\begin{equation} C_{out} = C_{src} + C_{dst} - 2 * min(C_{src} * \alpha_{dst}, C_{dst} * \alpha_{src}) \end{equation}

### DST

    public static final BlendMode DST

The source pixels are discarded, leaving the destination intact.

\(\alpha_{out} = \alpha_{dst}\)

\(C_{out} = C_{dst}\)

### DST_ATOP

    public static final BlendMode DST_ATOP

Discards the destination pixels that are not covered by source pixels. Draws remaining destination pixels over source pixels.

\(\alpha_{out} = \alpha_{src}\)

\(C_{out} = \alpha_{src} * C_{dst} + (1 - \alpha_{dst}) * C_{src}\)

### DST_IN

    public static final BlendMode DST_IN

Keeps the destination pixels that cover source pixels, discards the remaining source and destination pixels.

\(\alpha_{out} = \alpha_{src} * \alpha_{dst}\)

\(C_{out} = C_{dst} * \alpha_{src}\)

### DST_OUT

    public static final BlendMode DST_OUT

Keeps the destination pixels that are not covered by source pixels. Discards destination pixels that are covered by source pixels. Discards all source pixels.

\(\alpha_{out} = (1 - \alpha_{src}) * \alpha_{dst}\)

\(C_{out} = (1 - \alpha_{src}) * C_{dst}\)

### DST_OVER

    public static final BlendMode DST_OVER

The source pixels are drawn behind the destination pixels.

\(\alpha_{out} = \alpha_{dst} + (1 - \alpha_{dst}) * \alpha_{src}\)

\(C_{out} = C_{dst} + (1 - \alpha_{dst}) * C_{src}\)

### EXCLUSION

    public static final BlendMode EXCLUSION

Subtracts darker from lighter with lower contrast.

\begin{equation} \alpha_{out} = \alpha_{src} + \alpha_{dst} - \alpha_{src} * \alpha_{dst} \end{equation}

\begin{equation} C_{out} = C_{src} + C_{dst} - 2 * C_{src} * C_{dst} \end{equation}

### HARD_LIGHT

    public static final BlendMode HARD_LIGHT

Makes destination lighter or darker, depending on source.

\(\alpha_{out} = \alpha_{src} + \alpha_{dst} - \alpha_{src} * \alpha_{dst}\)

\begin{equation} C_{out} = \begin{cases} 2*C_{src}*C_{dst} & C_{src}*(1-\alpha_{dst}) + C_{dst}*(1-\alpha_{src}) + 2*C_{src} \leq \alpha_{src} \\ \alpha_{src}*\alpha_{dst}- 2*(\alpha_{dst} - C_{dst})*(\alpha_{src} - C_{src}) & otherwise \end{cases} \end{equation}

### HUE

    public static final BlendMode HUE

Replaces hue of destination with hue of source, leaving saturation and luminosity unchanged.

### LIGHTEN

    public static final BlendMode LIGHTEN

Retains the largest component of the source and destination pixel.

\(\alpha_{out} = \alpha_{src} + \alpha_{dst} - \alpha_{src} * \alpha_{dst}\)

\(C_{out} = (1 - \alpha_{dst}) * C_{src} + (1 - \alpha_{src}) * C_{dst} + max(C_{src}, C_{dst})\)

### LUMINOSITY

    public static final BlendMode LUMINOSITY

Replaces luminosity of destination with luminosity of source, leaving hue and saturation unchanged.

### MODULATE

    public static final BlendMode MODULATE

Multiplies the source and destination pixels.

\(\alpha_{out} = \alpha_{src} * \alpha_{dst}\)

\(C_{out} = C_{src} * C_{dst}\)

### MULTIPLY

    public static final BlendMode MULTIPLY

Multiplies the source and destination pixels.

\(\alpha_{out} = \alpha_{src} + \alpha_{dst} - \alpha_{src} * \alpha_{dst}\)

\(C_{out} = C_{src} * (1 - \alpha_{dst}) + C_{dst} * (1 - \alpha_{src}) + (C_{src} * C_{dst})\)

### OVERLAY

    public static final BlendMode OVERLAY

Multiplies or screens the source and destination depending on the destination color.

\(\alpha_{out} = \alpha_{src} + \alpha_{dst} - \alpha_{src} * \alpha_{dst}\)

\(\begin{equation} C_{out} = \begin{cases} 2 * C_{src} * C_{dst} & 2 * C_{dst} \lt \alpha_{dst} \\ \alpha_{src} * \alpha_{dst} - 2 (\alpha_{dst} - C_{src}) (\alpha_{src} - C_{dst}) & otherwise \end{cases} \end{equation}\)

### PLUS

    public static final BlendMode PLUS

Adds the source pixels to the destination pixels and saturates the result.

\(\alpha_{out} = max(0, min(\alpha_{src} + \alpha_{dst}, 1))\)

\(C_{out} = max(0, min(C_{src} + C_{dst}, 1))\)

### SATURATION

    public static final BlendMode SATURATION

Replaces saturation of destination saturation hue of source, leaving hue and luminosity unchanged.

### SCREEN

    public static final BlendMode SCREEN

Adds the source and destination pixels, then subtracts the source pixels multiplied by the destination.

\(\alpha_{out} = \alpha_{src} + \alpha_{dst} - \alpha_{src} * \alpha_{dst}\)

\(C_{out} = C_{src} + C_{dst} - C_{src} * C_{dst}\)

### SOFT_LIGHT

    public static final BlendMode SOFT_LIGHT

Makes destination lighter or darker, depending on source.

Where \begin{equation} m = \begin{cases} C_{dst} / \alpha_{dst} & \alpha_{dst} \gt 0 \\ 0 & otherwise \end{cases} \end{equation}

\begin{equation} g = \begin{cases} (16 * m * m + 4 * m) * (m - 1) + 7 * m & 4 * C_{dst} \leq \alpha_{dst} \\ \sqrt m - m & otherwise \end{cases} \end{equation}

\begin{equation} f = \begin{cases} C_{dst} * (\alpha_{src} + (2 * C_{src} - \alpha_{src}) * (1 - m)) & 2 * C_{src} \leq \alpha_{src} \\ C_{dst} * \alpha_{src} + \alpha_{dst} * (2 * C_{src} - \alpha_{src}) * g & otherwise \end{cases} \end{equation}

\begin{equation} \alpha_{out} = \alpha_{src} + \alpha_{dst} - \alpha_{src} * \alpha_{dst} \end{equation} \begin{equation} C_{out} = C_{src} / \alpha_{dst} + C_{dst} / \alpha_{src} + f \end{equation}

### SRC

    public static final BlendMode SRC

The source pixels replace the destination pixels.

\(\alpha_{out} = \alpha_{src}\)

\(C_{out} = C_{src}\)

### SRC_ATOP

    public static final BlendMode SRC_ATOP

Discards the source pixels that do not cover destination pixels. Draws remaining source pixels over destination pixels.

\(\alpha_{out} = \alpha_{dst}\)

\(C_{out} = \alpha_{dst} * C_{src} + (1 - \alpha_{src}) * C_{dst}\)

### SRC_IN

    public static final BlendMode SRC_IN

Keeps the source pixels that cover the destination pixels, discards the remaining source and destination pixels.

\(\alpha_{out} = \alpha_{src} * \alpha_{dst}\)

\(C_{out} = C_{src} * \alpha_{dst}\)

### SRC_OUT

    public static final BlendMode SRC_OUT

Keeps the source pixels that do not cover destination pixels. Discards source pixels that cover destination pixels. Discards all destination pixels.

\(\alpha_{out} = (1 - \alpha_{dst}) * \alpha_{src}\)

\(C_{out} = (1 - \alpha_{dst}) * C_{src}\)

### SRC_OVER

    public static final BlendMode SRC_OVER

The source pixels are drawn over the destination pixels.

\(\alpha_{out} = \alpha_{src} + (1 - \alpha_{src}) * \alpha_{dst}\)

\(C_{out} = C_{src} + (1 - \alpha_{src}) * C_{dst}\)

### XOR

    public static final BlendMode XOR

Discards the source and destination pixels where source pixels cover destination pixels. Draws remaining source pixels.

\(\alpha_{out} = (1 - \alpha_{dst}) * \alpha_{src} + (1 - \alpha_{src}) * \alpha_{dst}\)

\(C_{out} = (1 - \alpha_{dst}) * C_{src} + (1 - \alpha_{src}) * C_{dst}\)

## Public methods

### valueOf

    public static BlendMode valueOf (String name)

Parameters
`name` | `String`

Returns
`BlendMode` |

### values

    public static final BlendMode[] values ()

Returns
`BlendMode[]` |

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*