Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8124316

Percentage based CornerRadii implemented incorrectly

XMLWordPrintable

      Any percentage based corner radii appear to be treated as normal values as opposed to percentages. This impacts both appearance and picking when pickOnBounds == false.


      public class HelloRegion extends Application {
          @Override public void start(Stage primaryStage) throws Exception {
              final Pane region = new Pane();
              region.relocate(10, 10);
              region.setPrefSize(100, 100);
              final BorderStroke b1 = new BorderStroke(Color.RED, BorderStrokeStyle.SOLID, new CornerRadii(.20, .15, .10, .05, true), new BorderWidths(10), Insets.EMPTY);
              region.setBorder(new Border(b1));

              Group group = new Group();
              group.getChildren().addAll(region);
              Scene scene = new Scene(group, 300, 300);

              primaryStage.setScene(scene);
              primaryStage.show();
          }

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

            rbair Richard Bair (Inactive)
            rbair Richard Bair (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: