- java.lang.Object
-
- org.arakhne.afc.nodefx.CenteringTransform
-
public class CenteringTransform extends Object
This feature describes all the parameters that must be used to center logical points on the screen view.- Since:
- 15.0
- Version:
- 17.0 2020-01-04 14:41:52
- Author:
- Stéphane GALLAND
- Maven Group Id:
- org.arakhne.afc.advanced
- Maven Artifact Id:
- nodefx
-
-
Constructor Summary
Constructors Constructor Description CenteringTransform(javafx.beans.property.BooleanProperty invertedAxisX, javafx.beans.property.BooleanProperty invertedAxisY, javafx.beans.property.ReadOnlyObjectProperty<Rectangle2afp<?,?,?,?,?,?>> visibleArea)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isInvertedAxisX()
Replies if the x axis of the displayed data is inverted regarding to the standard JavaFX coordinate system.boolean
isInvertedAxisY()
Replies if the Y axis of the displayed data is inverted regarding to the standard JavaFX coordinate system.double
toCenterX(double x)
Change the coordinate system ofx
from the global document coordinate system to the "centered" graphical coordinate system.double
toCenterY(double y)
Change the coordinate system ofy
from the global document coordinate system to the "centered" graphical coordinate system.double
toGlobalX(double x)
Change the coordinate system ofx
from the "centered" graphical coordinate system to the global document coordinate system.double
toGlobalY(double y)
Change the coordinate system ofy
from the "centered" graphical coordinate system to the global document coordinate system.
-
-
-
Constructor Detail
-
CenteringTransform
public CenteringTransform(javafx.beans.property.BooleanProperty invertedAxisX, javafx.beans.property.BooleanProperty invertedAxisY, javafx.beans.property.ReadOnlyObjectProperty<Rectangle2afp<?,?,?,?,?,?>> visibleArea)
Constructor.- Parameters:
invertedAxisX
- indicates if the x axis of the document is inverted regarding the JavaFX x axis.invertedAxisY
- indicates if the y axis of the document is inverted regarding the JavaFX y axis.visibleArea
- the bounds of the viewport in document coordinates.
-
-
Method Detail
-
isInvertedAxisX
@Pure public boolean isInvertedAxisX()
Replies if the x axis of the displayed data is inverted regarding to the standard JavaFX coordinate system.- Returns:
- the x coordinate of the viewport center in document coordinates.
-
isInvertedAxisY
@Pure public boolean isInvertedAxisY()
Replies if the Y axis of the displayed data is inverted regarding to the standard JavaFX coordinate system.- Returns:
- the Y coordinate of the viewport center in document coordinates.
-
toCenterX
@Pure public double toCenterX(double x)
Change the coordinate system ofx
from the global document coordinate system to the "centered" graphical coordinate system.- Parameters:
x
- the x document coordinate to convert.- Returns:
- the x coordinate in the "centered" graphical coordinate system.
-
toCenterY
@Pure public double toCenterY(double y)
Change the coordinate system ofy
from the global document coordinate system to the "centered" graphical coordinate system.- Parameters:
y
- the y document coordinate to convert.- Returns:
- the x coordinate in the "centered" graphical coordinate system.
-
toGlobalX
@Pure public double toGlobalX(double x)
Change the coordinate system ofx
from the "centered" graphical coordinate system to the global document coordinate system.- Parameters:
x
- the x graphical coordinate to convert.- Returns:
- the x coordinate in the global document coordinate system.
-
toGlobalY
@Pure public double toGlobalY(double y)
Change the coordinate system ofy
from the "centered" graphical coordinate system to the global document coordinate system.- Parameters:
y
- the y graphical coordinate to convert.- Returns:
- the x coordinate in the global coordinate system.
-
-