I have a image added with scene builder. It has a viewport with this characteristics: 400,400 300x300. As you can imagine there're a part of the image that isn't showing. I want to move the image but all. Rotate it in Z. So, the part that now isn't visible becomes visible.

For example, see that attitude indicator (my project is also an attitude indicator):

enter image description here

The background is rotated. But the image is bigger than you can see, so although it rotates you do't see white parts.

How can I do that??

有帮助吗?

解决方案

What you actually want to do is rotate around a pivot point (in your case the center of the screen).

http://download.java.net/jdk8/jfxdocs/javafx/scene/transform/Rotate.html

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top