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

FXCanvas needs to invert rotation angle when forwarding a gesture event

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: javafx
    • Labels:
      None
    • Subcomponent:
    • Introduced In Version:
      9

      Description

      The 'angle' of a (JavaFX) RotateEvent is interpretated as "positive values for clockwise rotation", while the 'rotation' value of an SWT GestureEvent is interpreted as "negative values indicate clockwise rotation".

      To compensate this, FXCanvas would need to invert the rotation value of the source GestureEvent when computing the angle value for the target RotateEvent (within FXCanvas.sendRotateEventToFX(int, GestureEvent)), which is unfortunately not done. As a consequence, rotation angle values are inverted compared to a standalone JavaFX application.

        Issue Links

          Activity

          Hide
          kcr Kevin Rushforth added a comment -
          If you can provide a patch and a test, we still have time to take this.
          Show
          kcr Kevin Rushforth added a comment - If you can provide a patch and a test, we still have time to take this.
          Hide
          anyssen Alexander Nyssen added a comment -
          Fine. The patch will be trivial, but I have to re-setup my environment first. I will try to provide something by tomorrow.
          Show
          anyssen Alexander Nyssen added a comment - Fine. The patch will be trivial, but I have to re-setup my environment first. I will try to provide something by tomorrow.
          Hide
          anyssen Alexander Nyssen added a comment -
          Show
          anyssen Alexander Nyssen added a comment - I uploaded a webrev to http://cr.openjdk.java.net/~anyssen/8173852/webrev/
          Hide
          azvegint Alexander Zvegintsev added a comment -
          Looks fine.
          Show
          azvegint Alexander Zvegintsev added a comment - Looks fine.
          Hide
          kcr Kevin Rushforth added a comment -
          +1
          Show
          kcr Kevin Rushforth added a comment - +1
          Hide
          kcr Kevin Rushforth added a comment -
          Changeset: 17fa5ea51ecb
          Author: anyssen
          Date: 2017-02-03 16:02 -0800
          URL: http://hg.openjdk.java.net/openjfx/9-dev/rt/rev/17fa5ea51ecb

          8173852: FXCanvas needs to invert rotation angle when forwarding a gesture event
          Summary: Ensured FXCanvas inverts the rotation angle when forwarding SWT GestureEvents to the embedded scene.
          Reviewed-by: azvegint, kcr
          Show
          kcr Kevin Rushforth added a comment - Changeset: 17fa5ea51ecb Author: anyssen Date: 2017-02-03 16:02 -0800 URL: http://hg.openjdk.java.net/openjfx/9-dev/rt/rev/17fa5ea51ecb 8173852: FXCanvas needs to invert rotation angle when forwarding a gesture event Summary: Ensured FXCanvas inverts the rotation angle when forwarding SWT GestureEvents to the embedded scene. Reviewed-by: azvegint, kcr
          Hide
          anyssen Alexander Nyssen added a comment -
          How can I find out in which early access OpenJDK build this is included? It seems the current one (156) does not yet provide the fix.
          Show
          anyssen Alexander Nyssen added a comment - How can I find out in which early access OpenJDK build this is included? It seems the current one (156) does not yet provide the fix.
          Hide
          kcr Kevin Rushforth added a comment -
          The fix is not yet in FX 9 master. It is planned to be integrated today for build 157.
          Show
          kcr Kevin Rushforth added a comment - The fix is not yet in FX 9 master. It is planned to be integrated today for build 157.

            People

            • Assignee:
              anyssen Alexander Nyssen
              Reporter:
              anyssen Alexander Nyssen
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: