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

Pixel error on antialias enabled two rectangles rotating.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: Not Evaluated Not Evaluated
    • None
    • 5.4.0
    • None
    • Linux 64bit Kubuntu 14.04 LTS, Nvidia GPU

      When antialias is enabled and two rectangles side by side are rotated there is a visible line between the two objects.

      import QtQuick 2.4
      import QtQuick.Window 2.2
      
      Window {
          id: root
          visible: true
          width: 250
          height: 200
      
          Text {
              anchors.top: parent.top
              anchors.topMargin: 10
      
              text: "Click to enable/disable AA"
          }
      
          property bool enableAA: true
          MouseArea {
              anchors.fill: parent
              onClicked: root.enableAA = !root.enableAA
          }
      
          Row {
              anchors.centerIn: parent
              spacing: 10
              Rectangle {
      
                  width: 80
                  height: 80
                  color: "orange"
                  Item {
                      id: rotate
                      anchors.fill: parent
      
                      Rectangle {
                          y: (parent.height)/4
                          x: (parent.width-width) / 2
                          width: parent.width / 2
                          height: parent.height / 4
                          color: "white"
                          antialiasing: root.enableAA
                      }
                      Rectangle {
                          y: parent.height/2
                          x: (parent.width-width) / 2
                          width: parent.width / 2
                          height: parent.height / 4
                          color: "white"
                          antialiasing: root.enableAA
                      }
                  }
              }
              Rectangle {
                  width: 80
                  height: 80
                  color: "orange"
                  Item {
                      id: rotate2
                      anchors.fill: parent
      
                      Rectangle {
                          id: l1
                          anchors.top: parent.top
                          anchors.topMargin: l1.height
                          anchors.left: parent.left
                          anchors.leftMargin: l1.width/2
                          width: parent.width / 2
                          height: parent.height / 4
                          color: "white"
                          antialiasing: root.enableAA
                      }
                      Rectangle {
                          anchors.top: l1.bottom
                          anchors.left: l1.left
                          width: parent.width / 2
                          height: parent.height / 4
                          color: "white"
                          antialiasing: root.enableAA
                      }
                  }
              }
          }
      
          RotationAnimator {
              target: rotate
              from: 0
              to: 360
              loops: Animation.Infinite
              duration: 2000
              running: true
          }
      
          RotationAnimator {
              target: rotate2
              from: 0
              to: 360
              loops: Animation.Infinite
              duration: 2000
              running: true
          }
      }
      

        1. AABug1.png
          18 kB
          Risto Avila
        2. AABug2.png
          18 kB
          Risto Avila
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            sletta Gunnar Sletta
            ravila Risto Avila
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes