Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-30914

Canvas: shadowBlur offset is incorrect

    XMLWordPrintable

Details

    • 030ebca1f74dfb6f858bc4e2c594bd2075ca189c

    Description

      import QtQuick 2.0
      
      Item {
          id: root
          width: 300
          height: 300
      
          function degToRad(degrees) {
              return degrees * (Math.PI / 180);
          }
      
          Canvas {
              id: contentCanvas
              width: parent.width
              height: parent.height
      
              onPaint: {
                  var ctx = getContext("2d");
                  ctx.lineWidth = 8;
                  ctx.strokeStyle = "blue";
                  ctx.shadowBlur = 8;
                  ctx.shadowColor = "blue";
                  ctx.shadowOffsetX = 0;
                  ctx.shadowOffsetY = 0;
      
                  ctx.beginPath();
                  ctx.arc(width / 2, height / 2, 50, degToRad(0), degToRad(360), false);
                  ctx.stroke();
              }
          }
      }
      

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-30914
          # Subject Branch Project Status CR V

          Activity

            People

              rodal Samuel Rødal
              mitch_curtis Mitch Curtis
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes