public enum

BlendModeCompat

extends java.lang.Enum<BlendModeCompat>

 java.lang.Object

↳java.lang.Enum<BlendModeCompat>

↳androidx.core.graphics.BlendModeCompat

Gradle dependencies

compile group: 'androidx.core', name: 'core', version: '1.15.0-alpha02'

  • groupId: androidx.core
  • artifactId: core
  • version: 1.15.0-alpha02

Artifact androidx.core:core:1.15.0-alpha02 it located at Google repository (https://maven.google.com/)

Androidx artifact mapping:

androidx.core:core com.android.support:support-compat

Overview

Compat version of , usages of BlendModeCompat will map to wherever possible

Summary

Enum Constants
CLEAR Destination pixels covered by the source are cleared to 0.
COLORReplaces hue and saturation of destination with hue and saturation of source, leaving luminosity unchanged.
COLOR_BURN Makes destination darker to reflect source.
COLOR_DODGE Makes destination brighter to reflect source.
DARKEN Retains the smallest component of the source and destination pixels.
DIFFERENCE Subtracts darker from lighter with higher contrast.
DST The source pixels are discarded, leaving the destination intact.
DST_ATOP Discards the destination pixels that are not covered by source pixels.
DST_IN Keeps the destination pixels that cover source pixels, discards the remaining source and destination pixels.
DST_OUT Keeps the destination pixels that are not covered by source pixels.
DST_OVER The source pixels are drawn behind the destination pixels.
EXCLUSION Subtracts darker from lighter with lower contrast.
HARD_LIGHT Makes destination lighter or darker, depending on source.
HUEReplaces hue of destination with hue of source, leaving saturation and luminosity unchanged.
LIGHTEN Retains the largest component of the source and destination pixel.
LUMINOSITYReplaces luminosity of destination with luminosity of source, leaving hue and saturation unchanged.
MODULATE Multiplies the source and destination pixels.
MULTIPLY Multiplies the source and destination pixels.
OVERLAY Multiplies or screens the source and destination depending on the destination color.
PLUS Adds the source pixels to the destination pixels and saturates the result.
SATURATIONReplaces saturation of destination saturation hue of source, leaving hue and luminosity unchanged.
SCREEN Adds the source and destination pixels, then subtracts the source pixels multiplied by the destination.
SOFT_LIGHT Makes destination lighter or darker, depending on source.
SRC The source pixels replace the destination pixels.
SRC_ATOP Discards the source pixels that do not cover destination pixels.
SRC_IN Keeps the source pixels that cover the destination pixels, discards the remaining source and destination pixels.
SRC_OUT Keeps the source pixels that do not cover destination pixels.
SRC_OVER The source pixels are drawn over the destination pixels.
XOR Discards the source and destination pixels where source pixels cover destination pixels.
Methods
public static BlendModeCompatvalueOf(java.lang.String name)

public static BlendModeCompatvalues()

from java.lang.Enum<E>clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
from java.lang.ObjectgetClass, notify, notifyAll, wait, wait, wait

Enum Constants

CLEAR

Destination pixels covered by the source are cleared to 0.

\(\alpha_{out} = 0\)

\(C_{out} = 0\)

SRC

The source pixels replace the destination pixels.

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

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

DST

The source pixels are discarded, leaving the destination intact.

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

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

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}\)

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}\)

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}\)

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}\)

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}\)

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}\)

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}\)

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}\)

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}\)

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))\)

MODULATE

Multiplies the source and destination pixels.

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

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

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}\)

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}\)

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})\)

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})\)

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}

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}

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}

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}

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}

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}

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})\)

HUE

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

SATURATION

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

COLOR

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

LUMINOSITY

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

Methods

public static BlendModeCompat values()

public static BlendModeCompat valueOf(java.lang.String name)

Source

/*
 * Copyright (C) 2019 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package androidx.core.graphics;

import android.os.Build;

import androidx.annotation.RequiresApi;

/**
 * Compat version of {@link android.graphics.BlendMode}, usages of {@link BlendModeCompat} will
 * map to {@link android.graphics.PorterDuff.Mode} wherever possible
 */
public enum BlendModeCompat {

    /**
     * {@usesMathJax}
     *
     * Destination pixels covered by the source are cleared to 0.
     *
     * <p>\(\alpha_{out} = 0\)</p>
     * <p>\(C_{out} = 0\)</p>
     */
    CLEAR,

    /**
     * {@usesMathJax}
     *
     * The source pixels replace the destination pixels.
     *
     * <p>\(\alpha_{out} = \alpha_{src}\)</p>
     * <p>\(C_{out} = C_{src}\)</p>
     */
    SRC,

    /**
     * {@usesMathJax}
     *
     * The source pixels are discarded, leaving the destination intact.
     *
     * <p>\(\alpha_{out} = \alpha_{dst}\)</p>
     * <p>\(C_{out} = C_{dst}\)</p>
     */
    DST,

    /**
     * {@usesMathJax}
     *
     * The source pixels are drawn over the destination pixels.
     *
     * <p>\(\alpha_{out} = \alpha_{src} + (1 - \alpha_{src}) * \alpha_{dst}\)</p>
     * <p>\(C_{out} = C_{src} + (1 - \alpha_{src}) * C_{dst}\)</p>
     */
    SRC_OVER,

    /**
     * {@usesMathJax}
     *
     * The source pixels are drawn behind the destination pixels.
     *
     * <p>\(\alpha_{out} = \alpha_{dst} + (1 - \alpha_{dst}) * \alpha_{src}\)</p>
     * <p>\(C_{out} = C_{dst} + (1 - \alpha_{dst}) * C_{src}\)</p>
     */
    DST_OVER,

    /**
     * {@usesMathJax}
     *
     * Keeps the source pixels that cover the destination pixels,
     * discards the remaining source and destination pixels.
     *
     * <p>\(\alpha_{out} = \alpha_{src} * \alpha_{dst}\)</p>
     * <p>\(C_{out} = C_{src} * \alpha_{dst}\)</p>
     */
    SRC_IN,

    /**
     * {@usesMathJax}
     *
     * Keeps the destination pixels that cover source pixels,
     *  discards the remaining source and destination pixels.
     * <p>\(\alpha_{out} = \alpha_{src} * \alpha_{dst}\)</p>
     * <p>\(C_{out} = C_{dst} * \alpha_{src}\)</p>
     */
    DST_IN,

    /**
     * {@usesMathJax}
     *
     * Keeps the source pixels that do not cover destination pixels.
     * Discards source pixels that cover destination pixels. Discards all
     * destination pixels.
     *
     * <p>\(\alpha_{out} = (1 - \alpha_{dst}) * \alpha_{src}\)</p>
     * <p>\(C_{out} = (1 - \alpha_{dst}) * C_{src}\)</p>
     */
    SRC_OUT,

    /**
     * {@usesMathJax}
     *
     * Keeps the destination pixels that are not covered by source pixels.
     * Discards destination pixels that are covered by source pixels. Discards all
     * source pixels.
     *
     * <p>\(\alpha_{out} = (1 - \alpha_{src}) * \alpha_{dst}\)</p>
     * <p>\(C_{out} = (1 - \alpha_{src}) * C_{dst}\)</p>
     */
    DST_OUT,

    /**
     * {@usesMathJax}
     *
     * Discards the source pixels that do not cover destination pixels.
     * Draws remaining source pixels over destination pixels.
     *
     * <p>\(\alpha_{out} = \alpha_{dst}\)</p>
     * <p>\(C_{out} = \alpha_{dst} * C_{src} + (1 - \alpha_{src}) * C_{dst}\)</p>
     */
    SRC_ATOP,

    /**
     * {@usesMathJax}
     *
     * Discards the destination pixels that are not covered by source pixels.
     * Draws remaining destination pixels over source pixels.
     *
     * <p>\(\alpha_{out} = \alpha_{src}\)</p>
     * <p>\(C_{out} = \alpha_{src} * C_{dst} + (1 - \alpha_{dst}) * C_{src}\)</p>
     */
    DST_ATOP,

    /**
     * {@usesMathJax}
     *
     * Discards the source and destination pixels where source pixels
     * cover destination pixels. Draws remaining source pixels.
     *
     * <p>
     *     \(\alpha_{out} = (1 - \alpha_{dst}) * \alpha_{src} + (1 - \alpha_{src}) * \alpha_{dst}\)
     * </p>
     * <p>\(C_{out} = (1 - \alpha_{dst}) * C_{src} + (1 - \alpha_{src}) * C_{dst}\)</p>
     */
    XOR,

    /**
     * {@usesMathJax}
     *
     * Adds the source pixels to the destination pixels and saturates
     * the result.
     *
     * <p>\(\alpha_{out} = max(0, min(\alpha_{src} + \alpha_{dst}, 1))\)</p>
     * <p>\(C_{out} = max(0, min(C_{src} + C_{dst}, 1))\)</p>
     */
    PLUS,

    /**
     * {@usesMathJax}
     *
     * Multiplies the source and destination pixels.
     *
     * <p>\(\alpha_{out} = \alpha_{src} * \alpha_{dst}\)</p>
     * <p>\(C_{out} = C_{src} * C_{dst}\)</p>
     *
     */
    MODULATE,

    /**
     * {@usesMathJax}
     *
     * Adds the source and destination pixels, then subtracts the
     * source pixels multiplied by the destination.
     * <p>\(\alpha_{out} = \alpha_{src} + \alpha_{dst} - \alpha_{src} * \alpha_{dst}\)</p>
     * <p>\(C_{out} = C_{src} + C_{dst} - C_{src} * C_{dst}\)</p>
     */
    SCREEN,

    /**
     * {@usesMathJax}
     *
     * Multiplies or screens the source and destination depending on the
     * destination color.
     *
     * <p>\(\alpha_{out} = \alpha_{src} + \alpha_{dst} - \alpha_{src} * \alpha_{dst}\)</p>
     * <p>\(\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}\)</p>
     */
    OVERLAY,

    /**
     * {@usesMathJax}
     *
     * Retains the smallest component of the source and
     * destination pixels.
     * <p>\(\alpha_{out} = \alpha_{src} + \alpha_{dst} - \alpha_{src} * \alpha_{dst}\)</p>
     * <p>
     *     \(C_{out} =
     *     (1 - \alpha_{dst}) * C_{src} + (1 - \alpha_{src}) * C_{dst} + min(C_{src}, C_{dst})\)
     * </p>
     */
    DARKEN,

    /**
     * {@usesMathJax}
     *
     * Retains the largest component of the source and
     * destination pixel.
     * <p>\(\alpha_{out} = \alpha_{src} + \alpha_{dst} - \alpha_{src} * \alpha_{dst}\)</p>
     * <p>
     *     \(C_{out} =
     *      (1 - \alpha_{dst}) * C_{src} + (1 - \alpha_{src}) * C_{dst} + max(C_{src}, C_{dst})\)
     * </p>
     */
    LIGHTEN,

    /**
     * {@usesMathJax}
     *
     * Makes destination brighter to reflect source.
     *     \(\alpha_{out} = \alpha_{src} + \alpha_{dst} - \alpha_{src} * \alpha_{dst}\)
     * </p>
     * <p>
     *      \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}
     * </p>
     */
    @RequiresApi(Build.VERSION_CODES.Q)
    COLOR_DODGE,

    /**
     * {@usesMathJax}
     *
     * Makes destination darker to reflect source.
     *
     * <p>
     *     \(\alpha_{out} = \alpha_{src} + \alpha_{dst} - \alpha_{src} * \alpha_{dst}\)
     * </p>
     * <p>
     *     \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}
     * </p>
     */
    @RequiresApi(Build.VERSION_CODES.Q)
    COLOR_BURN,

    /**
     * {@usesMathJax}
     *
     * Makes destination lighter or darker, depending on source.
     * <p>
     *     \(\alpha_{out} = \alpha_{src} + \alpha_{dst} - \alpha_{src} * \alpha_{dst}\)
     * </p>
     * <p>
     *     \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}
     * </p>
     */
    @RequiresApi(Build.VERSION_CODES.Q)
    HARD_LIGHT,

    /**
     * {@usesMathJax}
     *
     * Makes destination lighter or darker, depending on source.
     * <p>
     *     Where
     *       \begin{equation}
     *       m =
     *          \begin{cases}
     *              C_{dst} / \alpha_{dst} & \alpha_{dst} \gt 0 \\
     *              0 & otherwise
     *          \end{cases}
     *       \end{equation}
     * </p>
     * <p>
     *       \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}
     * </p>
     * <p>
     *       \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}
     * </p>
     * <p>
     *       \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}
     * </p>
     */
    @RequiresApi(Build.VERSION_CODES.Q)
    SOFT_LIGHT,

    /**
     * {@usesMathJax}
     *
     * Subtracts darker from lighter with higher contrast.
     * <p>
     *     \begin{equation}
     *          \alpha_{out} = \alpha_{src} + \alpha_{dst} - \alpha_{src} * \alpha_{dst}
     *     \end{equation}
     * </p>
     * <p>
     *     \begin{equation}
     *           C_{out} = C_{src} + C_{dst} - 2 * min(C_{src}
     *                       * \alpha_{dst}, C_{dst} * \alpha_{src})
     *     \end{equation}
     * </p>
     */
    @RequiresApi(Build.VERSION_CODES.Q)
    DIFFERENCE,

    /**
     * {@usesMathJax}
     *
     * Subtracts darker from lighter with lower contrast.
     * <p>
     *     \begin{equation}
     *          \alpha_{out} = \alpha_{src} + \alpha_{dst} - \alpha_{src} * \alpha_{dst}
     *     \end{equation}
     * </p>
     * <p>
     *     \begin{equation}
     *          C_{out} = C_{src} + C_{dst} - 2 * C_{src} * C_{dst}
     *     \end{equation}
     * </p>
     */
    @RequiresApi(Build.VERSION_CODES.Q)
    EXCLUSION,

    /**
     * {@usesMathJax}
     *
     * Multiplies the source and destination pixels.
     * <p>\(\alpha_{out} = \alpha_{src} + \alpha_{dst} - \alpha_{src} * \alpha_{dst}\)</p>
     * <p>\(C_{out} =
     *      C_{src} * (1 - \alpha_{dst}) + C_{dst} * (1 - \alpha_{src}) + (C_{src} * C_{dst})\)
     * </p>
     */
    @RequiresApi(Build.VERSION_CODES.Q)
    MULTIPLY,

    /**
     * Replaces hue of destination with hue of source, leaving saturation
     * and luminosity unchanged.
     */
    @RequiresApi(Build.VERSION_CODES.Q)
    HUE,

    /**
     * Replaces saturation of destination saturation hue of source, leaving hue and
     * luminosity unchanged.
     */
    @RequiresApi(Build.VERSION_CODES.Q)
    SATURATION,

    /**
     * Replaces hue and saturation of destination with hue and saturation of source,
     * leaving luminosity unchanged.
     */
    @RequiresApi(Build.VERSION_CODES.Q)
    COLOR,

    /**
     * Replaces luminosity of destination with luminosity of source, leaving hue and
     * saturation unchanged.
     */
    @RequiresApi(Build.VERSION_CODES.Q)
    LUMINOSITY
}