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

[Context2D] Wrong drawing of arc with the arc() function

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P3: Somewhat important
    • None
    • 5.4.0
    • Quick: Other
    • None
    • * Windows 8 x64
      * Intel Graphics
      * Qt 5.4 (MinGW) x32
      * QtCreator (with the QBS plugin)

    Description

      In this sample:

          Canvas {
              id: canvas
              anchors.fill: parent
              property real endAngle: 0
              onEndAngleChanged: canvas.requestPaint()
              onPaint: {
                  var ctx = getContext("2d");
                  ctx.reset();
                  ctx.lineWidth = 10;
                  ctx.strokeStyle = "red"
                  ctx.beginPath();
                  ctx.arc(width / 2, height / 2, 50, 0.0, canvas.endAngle, true);
                  ctx.stroke();
              }
          }
      
          NumberAnimation { id: anim; target: canvas; property: "endAngle"; to: Math.PI / 2; duration: 5000 }
      
          Component.onCompleted: anim.start()
      

      with the anticlockwise direction and with the "0 < angle < PI (180 degree)", the arc has a wrong form (see "bug-draw-direction" screenshoot).

      Besides, the animation shows that grawing starts from the whole arc as 0-360 degre.. with the wrong clockwise direction!

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            liaqi Liang Qi
            kuzulis Denis Shienkov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes