Overview
A high-level effect that renders a shadow of the given content behind the content with the specified color, radius, and offset.
the code:
import javafx.scene.*;
import javafx.scene.effect.*;
import javafx.scene.paint.*;
import javafx.scene.shape.*;
import javafx.scene.text.*;
Group {
content: [
Text {
effect: DropShadow { offsetY: 3 color: Color.color(0.4, 0.4, 0.4) };
cache: true
x: 10 y: 70
fill: Color.RED
content: "JavaFX drop shadow..."
font: Font.font(null, FontWeight.BOLD, 32);
},
Circle {
effect: DropShadow { offsetY: 4 }
centerX: 50 centerY: 125
radius: 30
fill: Color.ORANGE
cache: true
}
]
}
produces:
Profile: desktop
Variable Summary
access | name | type | Can Read | Can Init | Can Write | Default Value | description |
---|---|---|---|---|---|---|---|
public | color | Color | BLACK |
The shadow The shadow Min: n/a Max: n/a Default: Color.BLACK Identity: n/aBLACK |
|||
public | offsetX | Number | 0.0 |
The shadow offset in the x direction, in pixels. The shadow offset in the x direction, in pixels. Min: n/a Max: n/a Default: 0.0 Identity: 0.00.0 |
|||
public | offsetY | Number | 0.0 |
The shadow offset in the y direction, in pixels. The shadow offset in the y direction, in pixels. Min: n/a Max: n/a Default: 0.0 Identity: 0.00.0 |
|||
public | radius | Number | 10.0 |
The radius of the shadow blur kernel. The radius of the shadow blur kernel. Min: 0.0 Max: 63.0 Default: 10.0 Identity: 0.010.0 |
|||
public | spread | Number | 0.0 |
The spread of the shadow. The spread of the shadow.
The spread is the portion of the radius where the contribution of
the source material will be 100%.
The remaining portion of the radius will have a contribution
controlled by the Guassian kernel.
A spread of Min: 0.0 Max: 1.0 Default: 0.0 Identity: 0.00.0 |
Inherited Variables
Function Summary
- public impl_getImpl() : com.sun.scenario.effect.Effect
Inherited Functions
javafx.scene.effect.Effect
- public getAccelType(config: java.awt.GraphicsConfiguration) : java.lang.String
-
Returns a
String
representing the type of hardware acceleration, if any, that is used when applying thisEffect
on the givenGraphicsConfiguration
.Returns a
String
representing the type of hardware acceleration, if any, that is used when applying thisEffect
on the givenGraphicsConfiguration
. This method is intended for informational or debugging purposes only.-
Parameters
- config
-
Returns
- String
- public abstract impl_getImpl() : com.sun.scenario.effect.Effect