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

1-pixel wide stroke rendered on integer pixel boundary is blurry

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • fx1.3
    • javafx
    • None
    • WinXP SP2, Java 1.6.0_20, Netbeans 6.8, JavaFX 1.3.0_b398

      The width of a Line does not make difference when strokeWidth=1 or strokeWidth=2, but if strokeWidth=3, the difference will be very obvious.
      Is it a precision problem? Below codes can be used to reproduce and the screenshot is attached

      import javafx.stage.Stage;
      import javafx.scene.Scene;
      import javafx.scene.text.Text;
      import javafx.scene.text.Font;
      import javafx.scene.paint.*;
      import javafx.scene.shape.*;

      Stage {
          title: "Application title"
          scene: Scene {
              width: 250
              height: 100
              content: [
                  Line {
                      startX: 0, startY: 49
                      endX: 200, endY: 49
                      strokeWidth: 1
                      stroke: Color.BLACK
                  }
                  Line {
                      startX: 0, startY: 59
                      endX: 200, endY: 59
                      strokeWidth: 2
                      stroke: Color.BLACK
                  }
                  Line {
                      startX: 0, startY: 69
                      endX: 200, endY: 69
                      strokeWidth: 3
                      stroke: Color.BLACK
                  }
              ]
          }
      }

        1. FanOfLines_1.2.1.PNG
          FanOfLines_1.2.1.PNG
          20 kB
        2. FanOfLines_1.3.1.PNG
          FanOfLines_1.3.1.PNG
          30 kB
        3. FanOfLines.fx
          0.5 kB
        4. strokeWidth.JPG
          strokeWidth.JPG
          6 kB

            Unassigned Unassigned
            lianqli Lianqi Li (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Imported: