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

JavaFX WebView canvas doesn't repeated images on stroke

XMLWordPrintable

    • web
    • x86
    • windows_7

      WebView does NOT support repeating images on stroke like other browsers like chrome, see screen shot for confirmation.

      See this codePen (like JsFiddle)
      http://codepen.io/anon/pen/pEoEBO

      html
      {code}
      <canvas id='canvas' width="600" height="300"></canvas>
      {code}

      javascript
      {code}
      var dots = new Image();

      dots.src = 'http://files.softicons.com/download/social-media-icons/free-social-media-icons-by-uiconstock/png/24x24/Google-Icon.png&#39;;

      dots.onload = function() {
      var c = document.getElementById('canvas').getContext('2d');
      c.beginPath();
      c.lineWidth="6";
      c.strokeStyle=c.createPattern(dots, 'repeat');
      c.moveTo(100,100);
      c.bezierCurveTo(200,200,200,0,300,100);
      c.stroke();

      };
      {code}

            jbhaskar Jay Bhaskar
            gucheng Guixin Cheng
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: