Overview
A blending mode that defines the manner in which the inputs
are composited together.
Each Mode
describes a mathematical equation that
combines premultiplied inputs to produce some premultiplied result.
the code:
import javafx.scene.*;
import javafx.scene.effect.*;
import javafx.scene.paint.*;
import javafx.scene.shape.*;
Group {
blendMode: BlendMode.MULTIPLY
content: [
Rectangle {
x: 50 y: 50 width: 50 height: 50
fill: Color.BLUE
}
Circle {
fill: Color.rgb(255, 0, 0, 0.5)
centerX: 50 centerY: 50 radius: 25
}
]
}
produces:
Profile: desktop
Field Summary
access | name | type | description |
---|---|---|---|
public static final | ADD | BlendMode |
The color and alpha components from the top input are added to those from the bottom input. The color and alpha components from the top input are added to those from the bottom input. The result is clamped to 1.0 if it exceeds the logical maximum of 1.0. Notes:
|
public static final | BLUE | BlendMode |
The blue component of the bottom input is replaced with the blue component of the top input; the other color components are unaffected. The blue component of the bottom input is replaced with the blue component of the top input; the other color components are unaffected. The alpha components are blended according to the SRC_OVER equation. |
public static final | COLOR_BURN | BlendMode |
The inverse of the bottom input color components are divided by the top input color components, all of which is then inverted to produce the resulting color. The inverse of the bottom input color components are divided by the top input color components, all of which is then inverted to produce the resulting color. The alpha components are blended according to the SRC_OVER equation. |
public static final | COLOR_DODGE | BlendMode |
The bottom input color components are divided by the inverse of the top input color components to produce the resulting color. The bottom input color components are divided by the inverse of the top input color components to produce the resulting color. The alpha components are blended according to the SRC_OVER equation. |
public static final | DARKEN | BlendMode |
The darker of the color components from the two inputs are selected to produce the resulting color. The darker of the color components from the two inputs are selected to produce the resulting color. The alpha components are blended according to the SRC_OVER equation. Notes:
|
public static final | DIFFERENCE | BlendMode |
The darker of the color components from the two inputs are subtracted from the lighter ones to produce the resulting color. The darker of the color components from the two inputs are subtracted from the lighter ones to produce the resulting color. The alpha components are blended according to the SRC_OVER equation. Notes:
|
public static final | EXCLUSION | BlendMode |
The color components from the two inputs are multiplied and doubled, and then subtracted from the sum of the bottom input color components, to produce the resulting color. The color components from the two inputs are multiplied and doubled, and then subtracted from the sum of the bottom input color components, to produce the resulting color. The alpha components are blended according to the SRC_OVER equation. Notes:
|
public static final | GREEN | BlendMode |
The green component of the bottom input is replaced with the green component of the top input; the other color components are unaffected. The green component of the bottom input is replaced with the green component of the top input; the other color components are unaffected. The alpha components are blended according to the SRC_OVER equation. |
public static final | HARD_LIGHT | BlendMode |
The input color components are either multiplied or screened, depending on the top input color. The input color components are either multiplied or screened, depending on the top input color. The alpha components are blended according to the SRC_OVER equation. Notes: |
public static final | LIGHTEN | BlendMode |
The lighter of the color components from the two inputs are selected to produce the resulting color. The lighter of the color components from the two inputs are selected to produce the resulting color. The alpha components are blended according to the SRC_OVER equation. Notes:
|
public static final | MULTIPLY | BlendMode |
The color components from the first input are multiplied with those from the second input. The color components from the first input are multiplied with those from the second input. The alpha components are blended according to the SRC_OVER equation. Notes:
|
public static final | OVERLAY | BlendMode |
The input color components are either multiplied or screened, depending on the bottom input color. The input color components are either multiplied or screened, depending on the bottom input color. The alpha components are blended according to the SRC_OVER equation. Notes:
|
public static final | RED | BlendMode |
The red component of the bottom input is replaced with the red component of the top input; the other color components are unaffected. The red component of the bottom input is replaced with the red component of the top input; the other color components are unaffected. The alpha components are blended according to the SRC_OVER equation. |
public static final | SCREEN | BlendMode |
The color components from both of the inputs are inverted, multiplied with each other, and that result is again inverted to produce the resulting color. The color components from both of the inputs are inverted, multiplied with each other, and that result is again inverted to produce the resulting color. The alpha components are blended according to the SRC_OVER equation. Notes:
|
public static final | SOFT_LIGHT | BlendMode |
The input color components are either darkened or lightened, depending on the top input color. |
public static final | SRC_ATOP | BlendMode |
The part of the top input lying inside of the bottom input is blended with the bottom input. The part of the top input lying inside of the bottom input is blended with the bottom input. (Equivalent to the Porter-Duff "source atop destination" rule.) |
public static final | SRC_IN | BlendMode |
The part of the top input lying inside of the bottom input is kept in the resulting image. The part of the top input lying inside of the bottom input is kept in the resulting image. (Equivalent to the Porter-Duff "source in destination" rule.) |
public static final | SRC_OUT | BlendMode |
The part of the top input lying outside of the bottom input is kept in the resulting image. The part of the top input lying outside of the bottom input is kept in the resulting image. (Equivalent to the Porter-Duff "source held out by destination" rule.) |
public static final | SRC_OVER | BlendMode |
The top input is blended over the bottom input. The top input is blended over the bottom input. (Equivalent to the Porter-Duff "source over destination" rule.) |
Inherited Variables
Method Summary
- public static BlendMode valueOf(java.lang.String name)
- public static BlendMode[] values()