Package afester.javafx.svg
Class TransformationOperations
- java.lang.Object
-
- afester.javafx.svg.TransformationOperations
-
public class TransformationOperations extends Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TransformationOperationsgetFromAffine(javafx.scene.transform.Affine affine)Creates aTransformationOperationsobject from a JavaFX affine transformation.static TransformationOperationsgetFromSvg(org.w3c.dom.svg.SVGMatrix matrix)Creates aTransformationOperationsobject from an SVG transformation matrix.doublegetRotation()javafx.geometry.Point2DgetScale()javafx.geometry.Point2DgetSkew()javafx.geometry.Point2DgetTranslation()booleanhasRotation()booleanhasScale()booleanhasSkew()booleanhasTranslation()StringtoString()
-
-
-
Method Detail
-
getFromAffine
public static TransformationOperations getFromAffine(javafx.scene.transform.Affine affine)
Creates aTransformationOperationsobject from a JavaFX affine transformation.- Parameters:
affine- TheAffineobject for which to calculate the transformation operations.- Returns:
- A
TransformationOperationsobject which contains the translation, scale, rotation, and skew of the given transformation matrix.
-
getFromSvg
public static TransformationOperations getFromSvg(org.w3c.dom.svg.SVGMatrix matrix)
Creates aTransformationOperationsobject from an SVG transformation matrix.- Parameters:
matrix- TheSVGMatrixobject for which to calculate the transformation operations.- Returns:
- A
TransformationOperationsobject which contains the translation, scale, rotation, and skew of the given transformation matrix.
-
getTranslation
public javafx.geometry.Point2D getTranslation()
- Returns:
- The translation part of the transformation matrix.
-
getSkew
public javafx.geometry.Point2D getSkew()
- Returns:
- The skew part (in X- and Y-direction) of the transformation matrix.
-
getScale
public javafx.geometry.Point2D getScale()
- Returns:
- The scale part (in x- and y-direction) of the transformation matrix.
-
getRotation
public double getRotation()
- Returns:
- The rotation part (in degrees) of the transformation matrix.
-
hasRotation
public boolean hasRotation()
- Returns:
trueif the transformation matrix contains a rotation,falseotherwise.
-
hasScale
public boolean hasScale()
- Returns:
trueif the transformation matrix contains a scaling,falseotherwise.
-
hasSkew
public boolean hasSkew()
- Returns:
trueif the transformation matrix contains a skew,falseotherwise.
-
hasTranslation
public boolean hasTranslation()
- Returns:
trueif the transformation matrix contains a translation,falseotherwise.
-
-