如果可能的話,可以使用SceneBuilder旋轉一條不在中心但與另一個關鍵點不同的線,如果可能的話?感謝幫助。圍繞樞軸旋轉線? SceneBuilder JavaFx
即時通訊使用此代碼,但現在的支點是在中心:
@FXML
private Line lancettaQuadroCentrale;
@FXML
private void handleButtonAction(ActionEvent event) {
System.out.println("You clicked me!");
RotateTransition rt = new RotateTransition(Duration.seconds(4),lancettaQuadroCentrale);
rt.setByAngle(0);
rt.setToAngle(220);
rt.setCycleCount(Timeline.INDEFINITE);
rt.setAutoReverse(true);
rt.play();
}
看到這個[旋轉變換演示應用程序](https://gist.github.com/jewelsea/1475424),也許那裏說明的概念將幫助你。 – jewelsea