import javafx.scene.*; import javafx.scene.effect.*; import javafx.scene.paint.*; import javafx.scene.shape.*; Rectangle r = new Rectangle(); r.setX(50); r.setY(50); r.setWidth(50); r.setHeight(50); r.setFill(Color.BLUE); Circle c = new Circle(); c.setFill(Color.rgb(255, 0, 0, 0.5)); c.setCenterX(50); c.setCenterY(50); c.setRadius(25); c.setBlendMode(BlendMode.MULTIPLY); Group g = new Group(); g.getChildren().add(r); g.getChildren().add(c);
| Modifier and Type | Field and Description |
|---|---|
| public static final BlendMode | ADD
The color and alpha components from the top input are added to those from the bottom input. |
| public static final BlendMode | BLUE
The blue component of the bottom input is replaced with the blue component of the top input; the other color components are unaffected. |
| public static final BlendMode | COLOR_BURN
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. |
| public static final BlendMode | COLOR_DODGE
The bottom input color components are divided by the inverse of the top input color components to produce the resulting color. |
| public static final BlendMode | DARKEN
The darker of the color components from the two inputs are selected to produce the resulting color. |
| public static final BlendMode | DIFFERENCE
The darker of the color components from the two inputs are subtracted from the lighter ones to produce the resulting color. |
| public static final BlendMode | EXCLUSION
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. |
| public static final BlendMode | GREEN
The green component of the bottom input is replaced with the green component of the top input; the other color components are unaffected. |
| public static final BlendMode | HARD_LIGHT
The input color components are either multiplied or screened, depending on the top input color. |
| public static final BlendMode | LIGHTEN
The lighter of the color components from the two inputs are selected to produce the resulting color. |
| public static final BlendMode | MULTIPLY
The color components from the first input are multiplied with those from the second input. |
| public static final BlendMode | OVERLAY
The input color components are either multiplied or screened, depending on the bottom input color. |
| public static final BlendMode | RED
The red component of the bottom input is replaced with the red component of the top input; the other color components are unaffected. |
| public static final BlendMode | SCREEN
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. |
| public static final BlendMode | SOFT_LIGHT
The input color components are either darkened or lightened, depending on the top input color. |
| public static final BlendMode | SRC_ATOP
The part of the top input lying inside of the bottom input is blended with the bottom input. |
| public static final BlendMode | SRC_OVER
The top input is blended over the bottom input. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static BlendMode | |
| public static BlendMode[] |
| ADD | back to summary |
|---|---|
| public static final BlendMode ADD 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:
| |
| BLUE | back to summary |
|---|---|
| public static final BlendMode BLUE 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 | |
| COLOR_BURN | back to summary |
|---|---|
| public static final BlendMode COLOR_BURN 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 | |
| COLOR_DODGE | back to summary |
|---|---|
| public static final BlendMode COLOR_DODGE 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 | |
| DARKEN | back to summary |
|---|---|
| public static final BlendMode DARKEN 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 Notes:
| |
| DIFFERENCE | back to summary |
|---|---|
| public static final BlendMode DIFFERENCE 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 Notes:
| |
| EXCLUSION | back to summary |
|---|---|
| public static final BlendMode EXCLUSION 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 Notes:
| |
| GREEN | back to summary |
|---|---|
| public static final BlendMode GREEN 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 | |
| HARD_LIGHT | back to summary |
|---|---|
| public static final BlendMode HARD_LIGHT The input color components are either multiplied or screened,
depending on the top input color.
The alpha components are blended according
to the Notes: | |
| LIGHTEN | back to summary |
|---|---|
| public static final BlendMode LIGHTEN 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 Notes:
| |
| MULTIPLY | back to summary |
|---|---|
| public static final BlendMode MULTIPLY The color components from the first input are multiplied with those
from the second input.
The alpha components are blended according to
the Notes:
| |
| OVERLAY | back to summary |
|---|---|
| public static final BlendMode OVERLAY The input color components are either multiplied or screened,
depending on the bottom input color.
The alpha components are blended according
to the Notes:
| |
| RED | back to summary |
|---|---|
| public static final BlendMode RED 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 | |
| SCREEN | back to summary |
|---|---|
| public static final BlendMode SCREEN 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 Notes:
| |
| SOFT_LIGHT | back to summary |
|---|---|
| public static final BlendMode SOFT_LIGHT The input color components are either darkened or lightened,
depending on the top input color.
The alpha components are blended according
to the Notes
| |
| SRC_ATOP | back to summary |
|---|---|
| public static final BlendMode SRC_ATOP 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.) | |
| SRC_OVER | back to summary |
|---|---|
| public static final BlendMode SRC_OVER The top input is blended over the bottom input. (Equivalent to the Porter-Duff "source over destination" rule.) | |
| BlendMode | back to summary |
|---|---|
| private BlendMode() | |
| valueOf | back to summary |
|---|---|
| public static BlendMode valueOf(String name) | |
| values | back to summary |
|---|---|
| public static BlendMode[] values() | |