-
Bug
-
Resolution: Fixed
-
P3
-
fx1.0
The following code demonstrates the bug in InnerShadow. If the shadow is offset so far that the blurred edge of the shadow becomes completely opaque then it should remain opaque all the way to the edge of the shape, but the effect ramps the shadow up to opaque, and then it ramps back down to transparent and there is a gap to the edge of the shape.
import javafx.animation.Interpolator;
import javafx.animation.Timeline;
import javafx.scene.Scene;
import javafx.scene.effect.*;
import javafx.scene.paint.*;
import javafx.scene.shape.Rectangle;
import javafx.stage.Stage;
Stage {
scene: Scene {
fill: Color.WHITE
width: 300
height: 120
content: [
Rectangle {
effect: InnerShadow { offsetX: 15 offsetY: 15 }
x: 100
y: 20
width: 50
height: 50
fill: Color.RED
}
Rectangle {
effect: InnerShadow { offsetX: -15 offsetY: -15 }
x: 200
y: 20
width: 50
height: 50
fill: Color.RED
}
]
}
}
import javafx.animation.Interpolator;
import javafx.animation.Timeline;
import javafx.scene.Scene;
import javafx.scene.effect.*;
import javafx.scene.paint.*;
import javafx.scene.shape.Rectangle;
import javafx.stage.Stage;
Stage {
scene: Scene {
fill: Color.WHITE
width: 300
height: 120
content: [
Rectangle {
effect: InnerShadow { offsetX: 15 offsetY: 15 }
x: 100
y: 20
width: 50
height: 50
fill: Color.RED
}
Rectangle {
effect: InnerShadow { offsetX: -15 offsetY: -15 }
x: 200
y: 20
width: 50
height: 50
fill: Color.RED
}
]
}
}