Enum Class BlendingMode
- All Implemented Interfaces:
Serializable
,Comparable<BlendingMode>
,Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionCreates a color with the hue and saturation of the source color and the luminosity of the backdrop color.Darkens the backdrop color to reflect the source color.Brightens the backdrop color to reflect the source color.Selects the darker of the backdrop and source colors.Subtracts the darker of the two constituent colors from the lighter color.Looks at the color information in each channel and divides the blend color from the base color.Multiplies or screens the colors, depending on the source color value.Adds the red, green and blue channel values of the blend color to the RGB values of the base color.Creates a color with the hue of the source color and the saturation and luminosity of the backdrop color.Selects the lighter of the backdrop and source colors.Looks at the color information in each channel and darkens the base color to reflect the blend color by decreasing the brightness.Looks at the color information in each channel and brightens the base color to reflect the blend color by increasing the brightness.Burns or dodges the colors by decreasing or increasing the brightness, depending on the blend color.Creates a color with the luminosity of the source color and the hue and saturation of the backdrop color.The source color is multiplied by the destination color and replaces the destination.Specifies no blending.Multiplies or screens the colors, depending on the backdrop color value.Replaces the colors, depending on the blend color.Creates a color with the saturation of the source color and the hue and luminosity of the backdrop color.Multiplies the complements of the backdrop and source color values, then complements the result.Darkens or lightens the colors, depending on the source color value.Looks at the color information in each channel and subtracts the blend color from the base color.Burns or dodges the colors by increasing or decreasing the contrast, depending on the blend color. -
Method Summary
Modifier and TypeMethodDescriptionstatic BlendingMode
Returns the enum constant of this class with the specified name.static BlendingMode[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SourceOver
-
Add
-
Normal
Specifies no blending. The blending formula simply selects the source color. -
Darken
Selects the darker of the backdrop and source colors. The backdrop is replaced with the source where the source is darker; otherwise, it is left unchanged. -
Multiply
The source color is multiplied by the destination color and replaces the destination. The resultant color is always at least as dark as either the source or destination color. Multiplying any color with black results in black. Multiplying any color with white preserves the original color. -
ColorBurn
Darkens the backdrop color to reflect the source color. Painting with white produces no change. -
LinearBurn
Looks at the color information in each channel and darkens the base color to reflect the blend color by decreasing the brightness. Blending with white produces no change. -
Lighten
Selects the lighter of the backdrop and source colors. The backdrop is replaced with the source where the source is lighter; otherwise, it is left unchanged. -
Screen
Multiplies the complements of the backdrop and source color values, then complements the result. The result color is always at least as light as either of the two constituent colors. Screening any color with white produces white; screening with black leaves the original color unchanged. The effect is similar to projecting multiple photographic slides simultaneously onto a single screen. -
ColorDodge
Brightens the backdrop color to reflect the source color. Painting with black produces no changes. -
LinearDodge
Looks at the color information in each channel and brightens the base color to reflect the blend color by increasing the brightness. Blending with black produces no change. -
Overlay
Multiplies or screens the colors, depending on the backdrop color value. Source colors overlay the backdrop while preserving its highlights and shadows. The backdrop color is not replaced but is mixed with the source color to reflect the lightness or darkness of the backdrop. Overlay is the inverse of the ‘hardlight’ blend mode. -
SoftLight
Darkens or lightens the colors, depending on the source color value. The effect is similar to shining a diffused spotlight on the backdrop -
HardLight
Multiplies or screens the colors, depending on the source color value. The effect is similar to shining a harsh spotlight on the backdrop. -
VividLight
Burns or dodges the colors by increasing or decreasing the contrast, depending on the blend color. If the blend color (light source) is lighter than 50% gray, the image is lightened by decreasing the contrast. If the blend color is darker than 50% gray, the image is darkened by increasing the contrast. -
LinearLight
Burns or dodges the colors by decreasing or increasing the brightness, depending on the blend color. If the blend color (light source) is lighter than 50% gray, the image is lightened by increasing the brightness. If the blend color is darker than 50% gray, the image is darkened by decreasing the brightness. -
PinLight
Replaces the colors, depending on the blend color. If the blend color (light source) is lighter than 50% gray, pixels darker than the blend color are replaced, and pixels lighter than the blend color do not change. If the blend color is darker than 50% gray, pixels lighter than the blend color are replaced, and pixels darker than the blend color do not change. This is useful for adding special effects to an image. -
HardMix
Adds the red, green and blue channel values of the blend color to the RGB values of the base color. If the resulting sum for a channel is 255 or greater, it receives a value of 255; if less than 255, a value of 0. Therefore, all blended pixels have red, green, and blue channel values of either 0 or 255. This changes all ixels to primary additive colors (red, green, or blue), white, or black. -
Difference
Subtracts the darker of the two constituent colors from the lighter color. Painting with white inverts the backdrop color; painting with black produces no change. -
Substract
Looks at the color information in each channel and subtracts the blend color from the base color. -
Divide
Looks at the color information in each channel and divides the blend color from the base color. -
Hue
Creates a color with the hue of the source color and the saturation and luminosity of the backdrop color. -
Saturation
Creates a color with the saturation of the source color and the hue and luminosity of the backdrop color. Painting with this mode in an area of the backdrop that is a pure gray (no saturation) produces no change. -
Color
Creates a color with the hue and saturation of the source color and the luminosity of the backdrop color. This preserves the gray levels of the backdrop and is useful for coloring monochrome images or tinting color images. -
Luminosity
Creates a color with the luminosity of the source color and the hue and saturation of the backdrop color. This produces an inverse effect to that of the Color mode.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-