问题
in my javafx application, i have an imageView for which I have created an Rotate trasition, everything works fine , but the rotation direction is in counterclockwise of watch, i want to make it in opposite direction .
this is My code :
RotateTransition rt = new RotateTransition(Duration.millis(3000), myImageView);
rt.setByAngle(360);
rt.setCycleCount(1);
rt.setAutoReverse(false);
rt.play()
;
回答1:
It seems to be undocumented, but setting a negative angle results in a counter-clockwise rotation:
rt.setByAngle(-360);
来源:https://stackoverflow.com/questions/44094481/change-direction-of-javafx-rotatetransition-to-direction-of-clockwise