-
Bug
-
Resolution: Fixed
-
P4
-
8u20
-
Windows 7 64-bit
Java 8u20 b23
(and earlier release versions of both Java 7 and 8)
A Region defined by -fx-shape is leaving trails on the screen when a reposition it.
Could be related to RT-25066, RT-33502
Here is a simple test case:
cliptest/ClipTest.css:
.custom-arrow {
-fx-position-shape: false;
-fx-scale-shape: false;
-fx-shape: "M0,0L8,3L8-3z";
-fx-border-color: white;
-fx-border-width: 2;
-fx-background-color: white;
}
cliptest/ClipTest.java:
package cliptest;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.Region;
import javafx.scene.paint.Color;
import javafx.stage.Stage;
public class ClipTest extends Application {
@Override
public void start(Stage primaryStage) {
Region arrow = new Region();
arrow.getStyleClass().add("custom-arrow");
arrow.setOnMouseDragged(evt -> {
AnchorPane.setLeftAnchor(arrow, evt.getSceneX());
AnchorPane.setTopAnchor(arrow, evt.getSceneY());
});
AnchorPane root = new AnchorPane();
root.getChildren().add(arrow);
AnchorPane.setLeftAnchor(arrow, 100.0);
AnchorPane.setTopAnchor(arrow, 100.0);
Scene scene = new Scene(root, 500, 400);
scene.setFill(Color.BLACK);
scene.getStylesheets().add("/cliptest/ClipTest.css");
primaryStage.setTitle("Region clipping issue - Drag the triangle");
primaryStage.setScene(scene);
primaryStage.show();
}
public static void main(String[] args) { launch(args); }
}
Could be related to RT-25066, RT-33502
Here is a simple test case:
cliptest/ClipTest.css:
.custom-arrow {
-fx-position-shape: false;
-fx-scale-shape: false;
-fx-shape: "M0,0L8,3L8-3z";
-fx-border-color: white;
-fx-border-width: 2;
-fx-background-color: white;
}
cliptest/ClipTest.java:
package cliptest;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.Region;
import javafx.scene.paint.Color;
import javafx.stage.Stage;
public class ClipTest extends Application {
@Override
public void start(Stage primaryStage) {
Region arrow = new Region();
arrow.getStyleClass().add("custom-arrow");
arrow.setOnMouseDragged(evt -> {
AnchorPane.setLeftAnchor(arrow, evt.getSceneX());
AnchorPane.setTopAnchor(arrow, evt.getSceneY());
});
AnchorPane root = new AnchorPane();
root.getChildren().add(arrow);
AnchorPane.setLeftAnchor(arrow, 100.0);
AnchorPane.setTopAnchor(arrow, 100.0);
Scene scene = new Scene(root, 500, 400);
scene.setFill(Color.BLACK);
scene.getStylesheets().add("/cliptest/ClipTest.css");
primaryStage.setTitle("Region clipping issue - Drag the triangle");
primaryStage.setScene(scene);
primaryStage.show();
}
public static void main(String[] args) { launch(args); }
}
- relates to
-
JDK-8133826 [PieChart] Separator looks blurred since JRE 8u40
- Open
-
JDK-8088335 [Region] scaled shape with centered or outer stroke is forced to inner
- Open
-
JDK-8089063 Dotted Border clipped to the outside
- Resolved
-
JDK-8089221 [Region] Stroked shapes rendered differently starting with 8u40
- Closed