Affine object that shears coordinates
by the specified multipliers. The matrix representing the shearing transformation
around a pivot point (pivotX, pivotY) with multiplication factors x
and y is as follows:
[ 1 x 0 -x*pivotY ]
[ y 1 0 -y*pivotX ]
[ 0 0 1 0 ]
For example:
Text text = new Text("Using Shear for pseudo-italic font");
text.setX(20);
text.setY(50);
text.setFont(new Font(20));
text.getTransforms().add(new Shear(-0.35, 0));
| Modifier and Type | Field and Description |
|---|---|
| private DoubleProperty | pivotX
Defines the X coordinate of the shear pivot point. |
| private DoubleProperty | pivotY
Defines the Y coordinate of the shear pivot point. |
| private DoubleProperty | x
Defines the multiplier by which coordinates are shifted in the direction of the positive X axis as a factor of their Y coordinate. |
| private DoubleProperty | y
Defines the multiplier by which coordinates are shifted in the direction of the positive Y axis as a factor of their X coordinate. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | Shear(double
the multiplier by which coordinates are shifted in the direction
of the positive X axis as a factor of their Y coordinate x, double the multiplier by which coordinates are shifted in the direction
of the positive Y axis as a factor of their X coordinate y)Creates a new instance of Shear. |
| public | Shear(double
the multiplier by which coordinates are shifted in the direction
of the positive X axis as a factor of their Y coordinate x, double the multiplier by which coordinates are shifted in the direction
of the positive Y axis as a factor of their X coordinate y, double the X coordinate of the shear pivot point pivotX, double the Y coordinate of the shear pivot point pivotY)Creates a new instance of Shear with pivot. |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | appendTo(Affine
Affine instance to append toOverrides javafx. Visitor from |
| pack-priv void | |
| public Shear | |
| pack-priv boolean | computeIs2D()
Overrides javafx. Computes if this transform is currently a 2D transform (has no effect in the direction of Z axis). |
| pack-priv boolean | computeIsIdentity()
Overrides javafx. Computes if this transform is currently an identity (has no effect in any direction). |
| public Transform | createConcatenation(Transform
transform to be concatenated with this transform transform)Overrides javafx. Returns the concatenation of this transform and the specified transform. |
| public Transform | createInverse()
Overrides javafx. Returns the inverse transform of this transform. |
| public Point2D | deltaTransform(double
vector magnitude in the direction of the X axis x, double vector magnitude in the direction of the Y axis y)Overrides javafx. Transforms the relative magnitude vector by this transform. |
| public Point3D | deltaTransform(double
vector magnitude in the direction of the X axis x, double vector magnitude in the direction of the Y axis y, double vector magnitude in the direction of the Z axis z)Overrides javafx. Transforms the relative magnitude vector by this transform. |
| pack-priv BaseTransform | |
| pack-priv void | fill2DArray(double[]
array to be filled with the 6 2D elements array)Overrides javafx. Core of the toArray implementation for the 2D case. |
| pack-priv void | fill3DArray(double[]
array to be filled with the 12 3D elements array)Overrides javafx. Core of the toArray implementation for the 3D case. |
| public double | getMxy()
Overrides javafx. Gets the XY coordinate element of the 3x4 matrix. |
| public double | getMyx()
Overrides javafx. Gets the YX coordinate element of the 3x4 matrix. |
| public final double | |
| public final double | |
| public double | getTx()
Overrides javafx. Gets the X coordinate translation element of the 3x4 matrix. |
| public double | getTy()
Overrides javafx. Gets the Y coordinate translation element of the 3x4 matrix. |
| public final double | |
| public final double | |
| public Point2D | inverseDeltaTransform(double
vector magnitude in the direction of the X axis x, double vector magnitude in the direction of the Y axis y)Overrides javafx. Transforms the relative magnitude vector by the inverse of this transform. |
| public Point3D | inverseDeltaTransform(double
vector magnitude in the direction of the X axis x, double vector magnitude in the direction of the Y axis y, double vector magnitude in the direction of the Z axis z)Overrides javafx. Transforms the relative magnitude vector by the inverse of this transform. |
| public Point2D | inverseTransform(double
the X coordinate of the point x, double the Y coordinate of the point y)Overrides javafx. Transforms the specified point by the inverse of this transform. |
| public Point3D | inverseTransform(double
the X coordinate of the point x, double the Y coordinate of the point y, double the Z coordinate of the point z)Overrides javafx. Transforms the specified point by the inverse of this transform. |
| pack-priv void | inverseTransform2DPointsImpl(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)
Overrides javafx. Core of the inverseTransform2DPoints method. |
| pack-priv void | inverseTransform3DPointsImpl(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)
Overrides javafx. Core of the inverseTransform3DPoints method. |
| public final DoubleProperty | |
| public final DoubleProperty | |
| pack-priv void | prependTo(Affine
Affine instance to prepend toOverrides javafx. Visitor from |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public String | Returns: a string representation of thisShear object.Overrides java. Returns a string representation of this |
| public Point2D | transform(double
the X coordinate of the point x, double the Y coordinate of the point y)Overrides javafx. Transforms the specified point by this transform. |
| public Point3D | transform(double
the X coordinate of the point x, double the Y coordinate of the point y, double the Z coordinate of the point z)Overrides javafx. Transforms the specified point by this transform. |
| pack-priv void | transform2DPointsImpl(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)
Overrides javafx. Core of the transform2DPoints method. |
| pack-priv void | transform3DPointsImpl(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)
Overrides javafx. Core of the transform3DPoints method. |
| pack-priv void | validate()
Overrides javafx. Needed for the proper delivery of the TransformChangedEvent. |
| public final DoubleProperty | |
| public final DoubleProperty |
| pivotX | back to summary |
|---|---|
| private DoubleProperty pivotX Defines the X coordinate of the shear pivot point.
| |
| pivotY | back to summary |
|---|---|
| private DoubleProperty pivotY Defines the Y coordinate of the shear pivot point.
| |
| x | back to summary |
|---|---|
| private DoubleProperty x Defines the multiplier by which coordinates are shifted in the direction of the positive X axis as a factor of their Y coordinate. Typical values are in the range -1 to 1, exclusive.
| |
| y | back to summary |
|---|---|
| private DoubleProperty y Defines the multiplier by which coordinates are shifted in the direction of the positive Y axis as a factor of their X coordinate. Typical values are in the range -1 to 1, exclusive.
| |
| Shear | back to summary |
|---|---|
| public Shear() Creates a default Shear (identity). | |
| Shear | back to summary |
|---|---|
| public Shear(double x, double y) Creates a new instance of Shear. The pivot point is set to (0,0)
| |
| Shear | back to summary |
|---|---|
| public Shear(double x, double y, double pivotX, double pivotY) Creates a new instance of Shear with pivot.
| |
| appendTo | back to summary |
|---|---|
| pack-priv void appendTo(Affine a) Overrides javafx. Doc from javafx. Visitor from | |
| apply | back to summary |
|---|---|
| pack-priv void apply(final Affine3D trans) Implements abstract javafx.
| |
| clone | back to summary |
|---|---|
| public Shear clone() Overrides javafx. Doc from javafx. Returns a deep copy of this transform. | |
| computeIs2D | back to summary |
|---|---|
| pack-priv boolean computeIs2D() Overrides javafx. Doc from javafx. Computes if this transform is currently a 2D transform (has no effect in the direction of Z axis). Used by the subclasses to effectively provide value of the type2D property.
| |
| computeIsIdentity | back to summary |
|---|---|
| pack-priv boolean computeIsIdentity() Overrides javafx. Doc from javafx. Computes if this transform is currently an identity (has no effect in any direction). Used by the subclasses to effectively provide value of the identity property.
| |
| createConcatenation | back to summary |
|---|---|
| public Transform createConcatenation(Transform transform) Overrides javafx. Doc from javafx. Returns the concatenation of this transform and the specified transform.
Applying the resulting transform to a node has the same effect as
adding the two transforms to its | |
| createInverse | back to summary |
|---|---|
| public Transform createInverse() Overrides javafx. Doc from javafx. Returns the inverse transform of this transform. | |
| deltaTransform | back to summary |
|---|---|
| public Point2D deltaTransform(double x, double y) Overrides javafx. Doc from javafx. Transforms the relative magnitude vector by this transform. The vector is transformed without applying the translation components of the affine transformation matrix. This method can be used only for a 2D transform. | |
| deltaTransform | back to summary |
|---|---|
| public Point3D deltaTransform(double x, double y, double z) Overrides javafx. Doc from javafx. Transforms the relative magnitude vector by this transform. The vector is transformed without applying the translation components of the affine transformation matrix. | |
| derive | back to summary |
|---|---|
| pack-priv BaseTransform derive(final BaseTransform trans) Implements abstract javafx.
| |
| fill2DArray | back to summary |
|---|---|
| pack-priv void fill2DArray(double[] array) Overrides javafx. Doc from javafx. Core of the toArray implementation for the 2D case. All of the checks has been made by the enclosing method as well as the constant elements filled, this method only fills the varying elements to the array. Used by subclasses to fill the elements efficiently.
| |
| fill3DArray | back to summary |
|---|---|
| pack-priv void fill3DArray(double[] array) Overrides javafx. Doc from javafx. Core of the toArray implementation for the 3D case. All of the checks has been made by the enclosing method as well as the constant elements filled, this method only fills the varying elements to the array. Used by subclasses to fill the elements efficiently.
| |
| getMxy | back to summary |
|---|---|
| public double getMxy() Overrides javafx. Doc from javafx. Gets the XY coordinate element of the 3x4 matrix.
| |
| getMyx | back to summary |
|---|---|
| public double getMyx() Overrides javafx. Doc from javafx. Gets the YX coordinate element of the 3x4 matrix.
| |
| getPivotX | back to summary |
|---|---|
| public final double getPivotX() | |
| getPivotY | back to summary |
|---|---|
| public final double getPivotY() | |
| getTx | back to summary |
|---|---|
| public double getTx() Overrides javafx. Doc from javafx. Gets the X coordinate translation element of the 3x4 matrix.
| |
| getTy | back to summary |
|---|---|
| public double getTy() Overrides javafx. Doc from javafx. Gets the Y coordinate translation element of the 3x4 matrix.
| |
| getX | back to summary |
|---|---|
| public final double getX() | |
| getY | back to summary |
|---|---|
| public final double getY() | |
| inverseDeltaTransform | back to summary |
|---|---|
| public Point2D inverseDeltaTransform(double x, double y) throws NonInvertibleTransformException Overrides javafx. Doc from javafx. Transforms the relative magnitude vector by the inverse of this transform. The vector is transformed without applying the translation components of the affine transformation matrix. This method can be used only for a 2D transform.
| |
| inverseDeltaTransform | back to summary |
|---|---|
| public Point3D inverseDeltaTransform(double x, double y, double z) throws NonInvertibleTransformException Overrides javafx. Doc from javafx. Transforms the relative magnitude vector by the inverse of this transform. The vector is transformed without applying the translation components of the affine transformation matrix.
| |
| inverseTransform | back to summary |
|---|---|
| public Point2D inverseTransform(double x, double y) throws NonInvertibleTransformException Overrides javafx. Doc from javafx. Transforms the specified point by the inverse of this transform. This method can be used only for 2D transforms.
| |
| inverseTransform | back to summary |
|---|---|
| public Point3D inverseTransform(double x, double y, double z) throws NonInvertibleTransformException Overrides javafx. Doc from javafx. Transforms the specified point by the inverse of this transform.
| |
| inverseTransform2DPointsImpl | back to summary |
|---|---|
| pack-priv void inverseTransform2DPointsImpl(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts) throws NonInvertibleTransformException Overrides javafx. Doc from javafx. Core of the inverseTransform2DPoints method. All the checks has been performed and the care of the overlaps has been taken by the enclosing method, this method only transforms the points and fills them to the array. Used by the subclasses to perform the transform efficiently.
| |
| inverseTransform3DPointsImpl | back to summary |
|---|---|
| pack-priv void inverseTransform3DPointsImpl(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts) throws NonInvertibleTransformException Overrides javafx. Doc from javafx. Core of the inverseTransform3DPoints method. All the checks has been performed and the care of the overlaps has been taken by the enclosing method, this method only transforms the points and fills them to the array. Used by the subclasses to perform the transform efficiently.
| |
| pivotXProperty | back to summary |
|---|---|
| public final DoubleProperty pivotXProperty() | |
| pivotYProperty | back to summary |
|---|---|
| public final DoubleProperty pivotYProperty() | |
| prependTo | back to summary |
|---|---|
| pack-priv void prependTo(Affine a) Overrides javafx. Doc from javafx. Visitor from | |
| setPivotX | back to summary |
|---|---|
| public final void setPivotX(double value) | |
| setPivotY | back to summary |
|---|---|
| public final void setPivotY(double value) | |
| setX | back to summary |
|---|---|
| public final void setX(double value) | |
| setY | back to summary |
|---|---|
| public final void setY(double value) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns a string representation of this | |
| transform | back to summary |
|---|---|
| public Point2D transform(double x, double y) Overrides javafx. Doc from javafx. Transforms the specified point by this transform. This method can be used only for 2D transforms. | |
| transform | back to summary |
|---|---|
| public Point3D transform(double x, double y, double z) Overrides javafx. Doc from javafx. Transforms the specified point by this transform. | |
| transform2DPointsImpl | back to summary |
|---|---|
| pack-priv void transform2DPointsImpl(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts) Overrides javafx. Doc from javafx. Core of the transform2DPoints method. All the checks has been performed and the care of the overlaps has been taken by the enclosing method, this method only transforms the points and fills them to the array. Used by the subclasses to perform the transform efficiently.
| |
| transform3DPointsImpl | back to summary |
|---|---|
| pack-priv void transform3DPointsImpl(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts) Overrides javafx. Doc from javafx. Core of the transform3DPoints method. All the checks has been performed and the care of the overlaps has been taken by the enclosing method, this method only transforms the points and fills them to the array. Used by the subclasses to perform the transform efficiently.
| |
| validate | back to summary |
|---|---|
| pack-priv void validate() Overrides javafx. Doc from javafx. Needed for the proper delivery of the TransformChangedEvent. If the members are invalid, the transformChanged() notification is not called and the event is not delivered. To avoid that we need to manually validate all properties. Subclasses validate their specific properties.
| |
| xProperty | back to summary |
|---|---|
| public final DoubleProperty xProperty() | |
| yProperty | back to summary |
|---|---|
| public final DoubleProperty yProperty() | |