Rotate and Rotate transformation
James Weaver
james.weaver at oracle.com
Mon Feb 16 05:52:33 UTC 2015
Tom,
For reference, ZenGuitar3D.java has an example of using the Rotate
transformation, binding to values changing in a Timeline:
https://www.dropbox.com/sh/a6l9ff4346fdaiq/AAC10hi5Jt9XXpdEaOQ_DJY0a?dl=0
Regards,
James Weaver
On 2/15/15 4:59 PM, Benjamin Gudehus wrote:
> Hi Tom,
>
> this seems to be the case.
>
> Node's rotate property only accepts x and y coordinates, but not
> pivotX and pivotY for the rotation center. Interestingly
> RotateTransition uses the rotate property (in
> Transition#interpolate()) instead of a Rotate transformation.
>
> If you want to specify pivot coordinates, you have to use the Rotate
> transformation (or the Scale transformation). I transform Rotate and
> Scale transformation with Timeline; it also provides a stop() method
> which I needed for a geographical information system.
>
> --Benjamin
>
>
> On 2/15/15, Tom Eugelink <tbee at tbee.org> wrote:
>> Just to check that I'm seeing this right:
>> - The rotate property of a node can only rotate around the node's center.
>> - The RotateTransition simply manipulates a node's rotate property.
>>
>> So as soon as you have to rotate around any other point except the center,
>> these two classes cannot be used.
>>
>> The alternative is:
>> - Use a Rotate transformation, which allows specifying the rotation center.
>> - Animate that using a Timeline, because that is the easiest way to animatie
>> a transformation.
>>
>> Tom
>>
--
Regards,
James Weaver
Java Technology Ambassador
Oracle Corporation
james.weaver at oracle.com
Twitter: @JavaFXpert
More information about the openjfx-dev
mailing list