JDK-8173852 : FXCanvas needs to invert rotation angle when forwarding a gesture event
  • Type: Bug
  • Component: javafx
  • Sub-Component: other
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2017-02-02
  • Updated: 2017-02-10
  • Resolved: 2017-02-04
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9Fixed
Related Reports
Relates :  
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.
Comments
The fix is not yet in FX 9 master. It is planned to be integrated today for build 157.
10-02-2017

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.
10-02-2017

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
04-02-2017

+1
03-02-2017

Looks fine.
03-02-2017

I uploaded a webrev to http://cr.openjdk.java.net/~anyssen/8173852/webrev/
03-02-2017

Fine. The patch will be trivial, but I have to re-setup my environment first. I will try to provide something by tomorrow.
02-02-2017

If you can provide a patch and a test, we still have time to take this.
02-02-2017