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

fx-background-image and rounded borders

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • 8
    • 7u6
    • javafx
    • None
    • Processor: Intel Core 2 DUO 1.80 Ghz
      Memory: 3 GB RAM
      Operating system: Windows XP Professional 2002 Service Pack 3
      Graphic card: NVIDIA Quadro NVS 130M
      Java: 1.7.0_03
      JavaFX: 2.2 Developer Preview b14

      I am trying to use a simple image as background image for an HBox through repetition, but I have found a problem. The HBox has got rounded borders (using fx-background-radius) and when I set the background image with fx-background-image it does not fit the real borders of the HBox and it appears painted outside the limits.

      The css code is the following:

      -fx-background-radius: 0 0 30 30;
      -fx-background-image:url('image1.png');
      -fx-border-radius: 0 0 30 30;
      -fx-border-width:0 2 2 2;
      -fx-border-color:#D9D9D9 #D9D9D9 #D9D9D9 #D9D9D9;
      -fx-effect: dropshadow( two-pass-box , rgba(0,0,0,0.35) , 20.13095238095238,0.5 , 0 , 18 );

      Maybe this is the expected behaviour, but I consider a useful improvement that the background-image can be adjusted to the real geometry of the background and the visible part of the component itself.

      Thanks.

            jandrese Joe Andresen (Inactive)
            duke J. Duke
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: