سؤال

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