< prev index next >
modules/javafx.graphics/src/main/java/javafx/scene/transform/Rotate.java
Print this page
*** 42,59 ****
* coordinates so that the anchor point is at the origin (S1), then rotating them
* about the new origin (S2), and finally translating so that the
* intermediate origin is restored to the coordinates of the original
* anchor point (S3).
* <p>
! * For example, the matrix representing the returned transform of
! * new Rotate (theta, x, y, z) around the Z-axis
! *
! * is :
* <pre>
! * [ cos(theta) -sin(theta) 0 x-x*cos+y*sin ]
! * [ sin(theta) cos(theta) 0 y-x*sin-y*cos ]
! * [ 0 0 1 z ]
* </pre>
* <p>
* For example, to rotate a text 30 degrees around the Z-axis at
* anchor point of (50,30):
* <pre>{@code
--- 42,57 ----
* coordinates so that the anchor point is at the origin (S1), then rotating them
* about the new origin (S2), and finally translating so that the
* intermediate origin is restored to the coordinates of the original
* anchor point (S3).
* <p>
! * The matrix representing the rotation transformation around an axis {@code (x,y,z)}
! * by an angle {@code t} is as follows:
* <pre>
! * [ cos(t) -sin(t) 0 x-x*cos(t)+y*sin(t) ]
! * [ sin(t) cos(t) 0 y-x*sin(t)-y*cos(t) ]
! * [ 0 0 1 z ]
* </pre>
* <p>
* For example, to rotate a text 30 degrees around the Z-axis at
* anchor point of (50,30):
* <pre>{@code
< prev index next >