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

-fx-border-image-repeat behavior seems to be wrong

    Details

      Description

      Default behavior of -fx-border-image-repeat seems to be wrong (looks like it doesn't match http://www.w3.org/TR/css3-background/#border-image-process).
      Check attached images for details ("round" and "space" behave the same way as "repeat").
      To reproduce, use the following code:


      import javafx.application.Application;
      import javafx.scene.Group;
      import javafx.scene.Scene;
      import javafx.scene.control.Button;
      import javafx.stage.Stage;

      public class Main extends Application {

          public static final String style = "-fx-border-image-source: url(\"/border.png\");"
                  + "-fx-border-image-width: 30px;"
                  + "-fx-border-image-repeat: round;"
                  ;
          @Override
          public void start(Stage stage) throws Exception {
              Button b = new Button("Test me");
              b.setStyle(style);
              stage.setScene(new Scene(new Group(b)));
              stage.setTitle(com.sun.javafx.runtime.VersionInfo.getRuntimeVersion());
              stage.show();
          }
      }

        Attachments

        1. border.png
          border.png
          0.2 kB
        2. red-rectangle.png
          red-rectangle.png
          0.3 kB
        3. repeat.png
          repeat.png
          7 kB
        4. repeat2.png
          repeat2.png
          7 kB
        5. stretch.png
          stretch.png
          7 kB
        6. stretch2.png
          stretch2.png
          6 kB

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              ilatyshe Irina Grineva (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Imported: