-
Bug
-
Resolution: Not an Issue
-
P4
-
None
-
jfx11
-
x86_64
-
windows_10
ADDITIONAL SYSTEM INFORMATION :
Running on OpenJFX 11 using AdoptOpenJDK 11 (OpenJ9). I've tried both JFX 13 and JDK 13 with no luck.
A DESCRIPTION OF THE PROBLEM :
When you create a region, then apply a border (say a black, solid border with 1px width), THEN apply an effect (for my example an inner shadow), the effect will draw on top of the border, and there is no way to separate the two.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
First, create a region (my issue was caused by a button). Then, give this region a border (I used solid, black 1px). Then, give this region an effect (I used an innershadow). Your border is now completely overlayed by the effect
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The border to be drawn outside of the innershadow, considering it's an innershadow. Similarly, with a dropshadow, I'd expect the border to be drawn inside the dropshadow.
ACTUAL -
The border is drawn on top of the innershadow/dropshadow
---------- BEGIN SOURCE ----------
public class App extends Application {
@Override
public void start(Stage primaryStage) throws Exception {
Region example = new Region();
example.setMaxWidth(100);
example.setMaxHeight(100);
example.setEffect(new InnerShadow(BlurType.GAUSSIAN, Color.RED, 10, 0.04, 0, 0));
example.setStyle("-fx-background-color: white; -fx-border-color: BLUE; -fx-border-width: 5px;");
StackPane container = new StackPane();
container.setStyle("-fx-background-color: black;");
container.setAlignment(Pos.CENTER);
container.getChildren().add(example);
Scene scene = new Scene(container, 400, 400);
primaryStage.setScene(scene);
primaryStage.show();
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
If you surround the region in a generic "pane", you can set the border of the pane and set the effect to the region. However I have found poor scaling with this as there is almost always a pixel gap between the parent and the child.
FREQUENCY : always
Running on OpenJFX 11 using AdoptOpenJDK 11 (OpenJ9). I've tried both JFX 13 and JDK 13 with no luck.
A DESCRIPTION OF THE PROBLEM :
When you create a region, then apply a border (say a black, solid border with 1px width), THEN apply an effect (for my example an inner shadow), the effect will draw on top of the border, and there is no way to separate the two.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
First, create a region (my issue was caused by a button). Then, give this region a border (I used solid, black 1px). Then, give this region an effect (I used an innershadow). Your border is now completely overlayed by the effect
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The border to be drawn outside of the innershadow, considering it's an innershadow. Similarly, with a dropshadow, I'd expect the border to be drawn inside the dropshadow.
ACTUAL -
The border is drawn on top of the innershadow/dropshadow
---------- BEGIN SOURCE ----------
public class App extends Application {
@Override
public void start(Stage primaryStage) throws Exception {
Region example = new Region();
example.setMaxWidth(100);
example.setMaxHeight(100);
example.setEffect(new InnerShadow(BlurType.GAUSSIAN, Color.RED, 10, 0.04, 0, 0));
example.setStyle("-fx-background-color: white; -fx-border-color: BLUE; -fx-border-width: 5px;");
StackPane container = new StackPane();
container.setStyle("-fx-background-color: black;");
container.setAlignment(Pos.CENTER);
container.getChildren().add(example);
Scene scene = new Scene(container, 400, 400);
primaryStage.setScene(scene);
primaryStage.show();
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
If you surround the region in a generic "pane", you can set the border of the pane and set the effect to the region. However I have found poor scaling with this as there is almost always a pixel gap between the parent and the child.
FREQUENCY : always
- relates to
-
JDK-8238733 Effects should have insets
-
- Open
-