Affine matrix transformation

Just getting into Kotlin so apologies if I’m missing something elementary.

I want to use the javafx.scene.transform.Affine matrix to do some transformations. However, if I create a var matrix = Affine() and append a simple rotation transformation, when I try to transform a com.sun.javafx.geom.Point2D object, like matrix.transform(Point2D(0.0f, 0.0f)), the IntelliJ compiler flags that row as an error with the message:

None of the following functions can be called with the arguments supplied.

transform(Bounds!) defined in javafx.scene.transform.Affine
transform(Point2D!) defined in javafx.scene.transform.Affine
transform(Point3D!) defined in javafx.scene.transform.Affine

To answer my own question: I need to use the javafx.geometry.Point2D class not the com.sun.javafx.geom.Point2D one.

Assuming latter is an older library?..

It depends on what JDK you are using. Since java 9 a lot of jafafx classes are moved.