Enum BlendComposite.BlendingMode

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      ADD
      Add is the opposite of Subtract.
      AVERAGE
      The Average blending mode produces an average of the source and blend colors.
      BLUE
      Keeps the blue channel from the blend image and the red and green channels from the base image.
      COLOR
      The Color blending mode applies the hue and saturation of the blend color to the base image while retaining the luminance of the base image.
      COLOR_BURN
      The Color Burn blending mode increases the contrast to darken the base color while reflecting the blend color.
      COLOR_DODGE
      The Color Dodge blending mode is essentially the opposite of Color Burn.
      DARKEN
      The Darken blend mode compares the color information for each pixel of the base and the blend color and applies the darker color as the result.
      DIFFERENCE
      The Difference blending mode highlights the differences between the blend layer and the base layer.
      EXCLUSION
      The Exclusion blending mode works very much like Difference but the contrast is lower.
      FREEZE  
      GLOW  
      GREEN
      Keeps the green channel from the blend image and the red and blue channels from the base image.
      HARD_LIGHT
      Hard Light drastically lightens or darkens the base image depending on the brightness of the blend color.
      HARD_MIX  
      HEAT  
      HUE
      The Hue blend mode applies the hue of the blend color to the base image while retaining the luminance and saturation of the base image.
      INVERSE_COLOR_BURN
      Inverse Color Burn is the same as Color Burn with the source and destination swapped.
      INVERSE_COLOR_DODGE
      Inverse Color Dodge is the same as Color Dodge with the source and destination swapped.
      LIGHTEN
      The Lighten blending mode compares the color information for each pixel of the base and the blend color and applies the lighter color as the result.
      LINEAR_LIGHT  
      LUMINOSITY
      The Luminosity blending mode applies the luminosity (brightness) of the blend colors to the base image while retaining the hue and saturation of the base image.
      MULTIPLY
      The Multiply blend mode multiplies the base color with the blend color.
      NEGATION
      This one is the "opposite" of difference mode.
      OVERLAY
      The Overlay blending mode preserves the highlights and shadows of the base color while mixing the base color and the blend color.
      PIN_LIGHT  
      RED
      Keeps the red channel from the blend image and the green and blue channels from the base image.
      REFLECT  
      SATURATION
      The Saturation blending mode applies the saturation of the blend color to the base image while retaining the hue and luminance of the base image.
      SCREEN
      The Screen blending mode is the opposite of the Multiply mode in that it multiples the inverse of the base color with the blend color.
      SOFT_BURN  
      SOFT_DODGE  
      SOFT_LIGHT
      The Soft Light blend mode creates a subtle lighter or darker result depending on the brightness of the blend color.
      STAMP
      Similar to AVERAGE, but more severely lightens or darkens the edge colors.
      SUBTRACT
      The Subtract blend mode is similar to Color Burn but instead of increasing contrast, it decreases brightness to darken the base color and reflect the blend color.
      VIVID_LIGHT
      Burns or dodges the colors by increasing or decreasing the contrast, depending on the blend color.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private BlendingMode()  
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) abstract void blend​(int[] src, int[] dst, int[] result)
      Blends the input colors into the result.
      static BlendComposite.BlendingMode valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static BlendComposite.BlendingMode[] 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

      • AVERAGE

        public static final BlendComposite.BlendingMode AVERAGE
        The Average blending mode produces an average of the source and blend colors. The image will push colors toward the middle, reducing the extremes.
      • DARKEN

        public static final BlendComposite.BlendingMode DARKEN
        The Darken blend mode compares the color information for each pixel of the base and the blend color and applies the darker color as the result. Any pixels in the base image that are lighter than the blend color are replaced, and pixels that are darker are left unchanged. No part of the image will become lighter.
      • MULTIPLY

        public static final BlendComposite.BlendingMode MULTIPLY
        The Multiply blend mode multiplies the base color with the blend color. The resulting color will always be darker, unless the blend color is white, which will result in no change. 100% opaque black multiplied with any color will result in black. As you overlay strokes of color with the Multiply blending mode, each stroke will result in darker and darker color.
      • COLOR_BURN

        public static final BlendComposite.BlendingMode COLOR_BURN
        The Color Burn blending mode increases the contrast to darken the base color while reflecting the blend color. The darker the blend color, the more intensely the color will be applied in the base image. White as the blend color produces no change.
      • SUBTRACT

        public static final BlendComposite.BlendingMode SUBTRACT
        The Subtract blend mode is similar to Color Burn but instead of increasing contrast, it decreases brightness to darken the base color and reflect the blend color. It is also similar to the Multiply blend mode, but produces a much more intense result. White as the blend color produces no change.

        This mode is also known as Linear Burn.

      • LIGHTEN

        public static final BlendComposite.BlendingMode LIGHTEN
        The Lighten blending mode compares the color information for each pixel of the base and the blend color and applies the lighter color as the result. Any pixels in the base image that are darker than the blend color are replaced, and pixels that are lighter are left unchanged. No part of the image will become darker.
      • SCREEN

        public static final BlendComposite.BlendingMode SCREEN
        The Screen blending mode is the opposite of the Multiply mode in that it multiples the inverse of the base color with the blend color. What this means is that your image will get lighter overall. In areas where the blend color is black, the base image will be unchanged, and in areas where the blend or base color is white, the result will be no change. Dark areas in the base image will become significantly lighter, and bright areas will become only slightly lighter.
      • COLOR_DODGE

        public static final BlendComposite.BlendingMode COLOR_DODGE
        The Color Dodge blending mode is essentially the opposite of Color Burn. The Color Dodge blending mode decreases the contrast to brighten the base color while reflecting the blend color. The lighter the blend color, the more significant the color dodge effect will be making the result brighter, with less contrast, and tinted toward the blend color. Black as the blend color produces no change.
      • ADD

        public static final BlendComposite.BlendingMode ADD
        Add is the opposite of Subtract. It increases brightness to lighten the base color and reflect the blend color. It is also similar to the Screen blend mode, but produces a more intense result. Black as the blend color produces no change.

        This mode is also known as Linear Dodge.

      • OVERLAY

        public static final BlendComposite.BlendingMode OVERLAY
        The Overlay blending mode preserves the highlights and shadows of the base color while mixing the base color and the blend color. It is a combination of the Multiply and Screen blending modes--multiplying the dark areas, and screening the light areas. A blend color of 50% gray has no effect on the base image.
      • SOFT_LIGHT

        public static final BlendComposite.BlendingMode SOFT_LIGHT
        The Soft Light blend mode creates a subtle lighter or darker result depending on the brightness of the blend color. Blend colors that are more than 50% brightness will lighten the base image and colors that are less than 50% brightness will darken the base image. Pure black will create a slightly darker result; pure white will create a slightly lighter result, and 50% gray will have no effect on the base image.
      • HARD_LIGHT

        public static final BlendComposite.BlendingMode HARD_LIGHT
        Hard Light drastically lightens or darkens the base image depending on the brightness of the blend color. The effect is more intense than Soft Light because the contrast is also increased. Blend colors that are more than 50% brightness will lighten the base image in the same way as the screen blending mode. Colors that are less than 50% brightness will darken the base image in the same way as the multiply blending mode. Pure black will result in black; pure white will create a white result, and 50% gray will have no effect on the base image.
      • VIVID_LIGHT

        public static final BlendComposite.BlendingMode VIVID_LIGHT
        Burns or dodges the colors by increasing or decreasing the contrast, depending on the blend color. If the blend color is lighter than 50% grey, the image is lightened by decreasing the contrast. If the blend color is darker than 50% grey, the image is darkened by increasing the contrast.
      • DIFFERENCE

        public static final BlendComposite.BlendingMode DIFFERENCE
        The Difference blending mode highlights the differences between the blend layer and the base layer. The more technical explanation is that the blend color is subtracted from the base color--or vice-versa, depending on the brightness--and the result is the difference between them. When white is the blend color, the base image is inverted. When black is the blend color, there is no change.
      • EXCLUSION

        public static final BlendComposite.BlendingMode EXCLUSION
        The Exclusion blending mode works very much like Difference but the contrast is lower. When white is the blend color, the base image is inverted. When black is the blend color, there is no change.
      • HUE

        public static final BlendComposite.BlendingMode HUE
        The Hue blend mode applies the hue of the blend color to the base image while retaining the luminance and saturation of the base image. It gives the base image a tinted effect where the tinting is darkest in areas of high saturation. Where the blend color is a shade of gray (0% saturation), the base image is desaturated and where the base image is gray, the Hue blending mode has no effect.
      • SATURATION

        public static final BlendComposite.BlendingMode SATURATION
        The Saturation blending mode applies the saturation of the blend color to the base image while retaining the hue and luminance of the base image. Neutral tones (black, white, and gray) in the blend will desaturate the base image. Neutral areas in the base image will not be changed by the saturation blending mode.
      • COLOR

        public static final BlendComposite.BlendingMode COLOR
        The Color blending mode applies the hue and saturation of the blend color to the base image while retaining the luminance of the base image. Simply put, it colors the base image. Neutral blend colors will desaturate the base image.
      • LUMINOSITY

        public static final BlendComposite.BlendingMode LUMINOSITY
        The Luminosity blending mode applies the luminosity (brightness) of the blend colors to the base image while retaining the hue and saturation of the base image. Luminosity is the opposite of the Color blending mode.
      • NEGATION

        public static final BlendComposite.BlendingMode NEGATION
        This one is the "opposite" of difference mode. Note that it is NOT difference mode inverted, because black and white return the same result, but colors between become brighter instead of darker. This mode can be used to invert parts of the base image, but NOT to compare two images.
      • RED

        public static final BlendComposite.BlendingMode RED
        Keeps the red channel from the blend image and the green and blue channels from the base image.
      • GREEN

        public static final BlendComposite.BlendingMode GREEN
        Keeps the green channel from the blend image and the red and blue channels from the base image.
      • BLUE

        public static final BlendComposite.BlendingMode BLUE
        Keeps the blue channel from the blend image and the red and green channels from the base image.
    • Constructor Detail

      • BlendingMode

        private BlendingMode()
    • Method Detail

      • values

        public static BlendComposite.BlendingMode[] 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 (BlendComposite.BlendingMode c : BlendComposite.BlendingMode.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static BlendComposite.BlendingMode 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
      • blend

        abstract void blend​(int[] src,
                            int[] dst,
                            int[] result)
        Blends the input colors into the result.
        Parameters:
        src - the source RGBA
        dst - the destination RGBA
        result - the result RGBA
        Throws:
        java.lang.NullPointerException - if any argument is null