-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
8
-
None
At first I thought I was being bit by RT-17024, but actually this appears to be something different. The odd thing is that it is triggered by a change in whether the scene is using a depth buffer. My first guess is that it is a problem in picking.
public class HelloRectangle3D extends Application {
@Override public void start(Stage stage) throws Exception {
Rectangle background = new Rectangle(300, 300, Color.PURPLE);
background.setRotationAxis(Rotate.Y_AXIS);
background.setRotate(45);
Rectangle rect = new Rectangle(200, 200);
rect.setFill(new LinearGradient(0, 0, 0, 1, true, CycleMethod.NO_CYCLE, new Stop(0, Color.ORANGE), new Stop(1, Color.ORANGE.darker().darker())));
rect.setArcHeight(42);
rect.setArcWidth(42);
rect.setStroke(Color.WHITE);
rect.setStrokeWidth(5);
rect.setRotationAxis(Rotate.Y_AXIS);
Slider slider = new Slider(0, 360, 0);
rect.rotateProperty().bind(slider.valueProperty());
StackPane stack = new StackPane(background, rect);
stack.setPickOnBounds(false);
VBox vbox = new VBox(stack, slider);
vbox.setSpacing(50);
vbox.setAlignment(Pos.CENTER);
vbox.setMaxWidth(VBox.USE_PREF_SIZE);
vbox.setMaxHeight(VBox.USE_PREF_SIZE);
Scene scene = new Scene(new StackPane(vbox), 640, 480, true);
scene.setCamera(new PerspectiveCamera());
stage.setScene(scene);
stage.setTitle("HelloRectangle3D");
stage.show();
}
public static void main(String[] args) {
launch(args);
}
}
public class HelloRectangle3D extends Application {
@Override public void start(Stage stage) throws Exception {
Rectangle background = new Rectangle(300, 300, Color.PURPLE);
background.setRotationAxis(Rotate.Y_AXIS);
background.setRotate(45);
Rectangle rect = new Rectangle(200, 200);
rect.setFill(new LinearGradient(0, 0, 0, 1, true, CycleMethod.NO_CYCLE, new Stop(0, Color.ORANGE), new Stop(1, Color.ORANGE.darker().darker())));
rect.setArcHeight(42);
rect.setArcWidth(42);
rect.setStroke(Color.WHITE);
rect.setStrokeWidth(5);
rect.setRotationAxis(Rotate.Y_AXIS);
Slider slider = new Slider(0, 360, 0);
rect.rotateProperty().bind(slider.valueProperty());
StackPane stack = new StackPane(background, rect);
stack.setPickOnBounds(false);
VBox vbox = new VBox(stack, slider);
vbox.setSpacing(50);
vbox.setAlignment(Pos.CENTER);
vbox.setMaxWidth(VBox.USE_PREF_SIZE);
vbox.setMaxHeight(VBox.USE_PREF_SIZE);
Scene scene = new Scene(new StackPane(vbox), 640, 480, true);
scene.setCamera(new PerspectiveCamera());
stage.setScene(scene);
stage.setTitle("HelloRectangle3D");
stage.show();
}
public static void main(String[] args) {
launch(args);
}
}
- duplicates
-
JDK-8091609 Region should have pickOnBounds = false by default
-
- Open
-