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

Rotation has different scale and direction on different platforms/tablets

    XMLWordPrintable

Details

    • 5c92d21cce18eef9b57f42323b464b6670124c3a 67410cd644b76354ba17e9541903cdefa84fc85c b48febd568537793405bc103fb0f1eb65ef9ebdc

    Description

      The axis of rotation is defined differently on Windows and Linux. It has different direction and origin. The rotation() method should return uniform parameters not depending on the OS.

      Here are the formulas we use in Krita to get the floating point rotation value:

      X11:
      rotation = std::fmod(qreal(tablet->savedAxesData.rotation() - tablet->minRotation) /
      (tablet->maxRotation - tablet->minRotation) + 0.5, 1.0) * 360.0;

      WIN:
      // Rotation is measured in degrees. Axis inverted to fit
      // the coordinate system of the Linux driver.
      rotation = (360 - 1) - ort.orTwist / 10;

      Attachments

        Issue Links

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

          Activity

            People

              srutledg Shawn Rutledge
              dkazakov Dmitry Kazakov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews