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

JavaFx WebView canvas doesn't support dash within strokeRec

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 8, 9
    • javafx
    • JavaSE8 Windows/Linux + x86/x64.

    • web
    • x86
    • windows

        JavaFx Browser usually handles calling Context.setLineDash for any 2D canvas, but it does NOT work for when canvas is using a "strokeRect",
        strokeRect.

        We allow our customers to configure line dash for rectangles so it won't work right when using javafx WebView as the browser, but it works for all other browsers.

        Please, refer to attached PNG image for this problem too.

        This problem can be reproduced with following simple jsfiddle:

        https://jsfiddle.net/8tHDf/3/

        {code}
        var ctx = canvas.getContext('2d');
        ctx.lineWidth = 4;
        ctx.setLineDash([4,4]);
        ctx.strokeStyle = '#f00';
        ctx.strokeRect(10,30,70,70);
        {code}

          1. missingDash.png
            missingDash.png
            39 kB
          2. With-Fix.png
            With-Fix.png
            36 kB
          3. Without-Fix.png
            Without-Fix.png
            36 kB

              mbilla Murali Billa
              gucheng Guixin Cheng
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: