Node's rotate and scale properties do not have a way to use a non-central pivot as is allowed in Rotate and Scale transforms. This forces the user to define such a transform and add it to the node's transform list instead of the convenient built-in properties.
As a consequence, ScaleTransition and RotateTransition, which act directly on Node's properties, can't define a pivot as well. The workaround again is to animate the transforms' properties after they have been added to the transform list.
Adding these pivot properties to Node and the transitions would be very convenient.
The pivots can be represented either by a Point3D or a double for each axis (pivotX, pivotY, pivotZ). Points for consideration:
1. Scale transform uses 3 doubles each for both the scale amount and the pivot. Rotate transform uses 3 doubles for the pivot and a Point3D for the axis. This seems inconsistent.
2. Using Point3D is more concise.
3. Using Point3D is less performant (e.g., interpolation on a Point3D creates a lot of these objects).
4. Controlling only 1 axis is more difficult with Point3D as it does not expose its coordinates as properties.
5. Using Point3D allows the user to set a null value for the property. This already causes an NPE for rotationAxis (I believe null should be interpreted as the default instead).
As a consequence, ScaleTransition and RotateTransition, which act directly on Node's properties, can't define a pivot as well. The workaround again is to animate the transforms' properties after they have been added to the transform list.
Adding these pivot properties to Node and the transitions would be very convenient.
The pivots can be represented either by a Point3D or a double for each axis (pivotX, pivotY, pivotZ). Points for consideration:
1. Scale transform uses 3 doubles each for both the scale amount and the pivot. Rotate transform uses 3 doubles for the pivot and a Point3D for the axis. This seems inconsistent.
2. Using Point3D is more concise.
3. Using Point3D is less performant (e.g., interpolation on a Point3D creates a lot of these objects).
4. Controlling only 1 axis is more difficult with Point3D as it does not expose its coordinates as properties.
5. Using Point3D allows the user to set a null value for the property. This already causes an NPE for rotationAxis (I believe null should be interpreted as the default instead).
- duplicates
-
JDK-8090932 Define Scale origin in ScaleTransition
-
- Closed
-
-
JDK-8092296 Define rotation center in RotateTransition
-
- Closed
-
-
JDK-8092304 PBA: Request for control over the rotation pivot on target node
-
- Closed
-