Region caching fails for some common CSS styles due to image edge conditions

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P2
    • 8
    • Affects Version/s: 8
    • Component/s: javafx

      Application:


      public class HelloRegion extends Application {
          @Override public void start(Stage primaryStage) throws Exception {
              Region region = new Region();
              region.setStyle(
                      "-fx-background-color: gray, yellow;" +
                      "-fx-background-insets: 0, 0 0 0 1;");
              region.setPrefSize(300, 200);
              region.setMaxSize(300, 200);
              StackPane root = new StackPane();
              root.getChildren().add(region);
              Scene scene = new Scene(root, 640, 480);
              primaryStage.setScene(scene);
              primaryStage.show();
          }

          public static void main(String[] args) {
              launch(args);
          }
      }


      Attached screenshots show both "expected" and "actual". The problem here is that the cached image is 2x200 pixels, and when it gets mapped into the final destination space, it runs into image sampling edge conditions.

            Assignee:
            Richard Bair (Inactive)
            Reporter:
            Richard Bair (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: