Top Description Fields Constructors Methods
javafx.scene.transform

public Class Shear

extends Transform
Class Inheritance
Imports
javafx.beans.property.DoubleProperty, .DoublePropertyBase, com.sun.javafx.geom.transform.Affine3D, .BaseTransform, javafx.geometry.Point2D, .Point3D

This class represents an 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));
Since
JavaFX 2.0

Field Summary

Modifier and TypeField 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.

Constructor Summary

AccessConstructor and Description
public
Shear()

Creates a default Shear (identity).

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.

Method Summary

Modifier and TypeMethod and Description
pack-priv void
appendTo(Affine
Affine instance to append to
a
)

Overrides javafx.scene.transform.Transform.appendTo.

Visitor from Affine class which provides an efficient append operation for the subclasses.

pack-priv void
apply(final Affine3D trans)

Implements abstract javafx.scene.transform.Transform.apply.

public Shear
clone()

Overrides javafx.scene.transform.Transform.clone.

Returns a deep copy of this transform.

pack-priv boolean
computeIs2D()

Overrides javafx.scene.transform.Transform.computeIs2D.

Computes if this transform is currently a 2D transform (has no effect in the direction of Z axis).

pack-priv boolean
computeIsIdentity()

Overrides javafx.scene.transform.Transform.computeIsIdentity.

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.scene.transform.Transform.createConcatenation.

Returns the concatenation of this transform and the specified transform.

public Transform
createInverse()

Overrides javafx.scene.transform.Transform.createInverse.

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.scene.transform.Transform.deltaTransform.

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.scene.transform.Transform.deltaTransform.

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.scene.transform.Transform.fill2DArray.

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.scene.transform.Transform.fill3DArray.

Core of the toArray implementation for the 3D case.

public double
getMxy()

Overrides javafx.scene.transform.Transform.getMxy.

Gets the XY coordinate element of the 3x4 matrix.

public double
getMyx()

Overrides javafx.scene.transform.Transform.getMyx.

Gets the YX coordinate element of the 3x4 matrix.

public final double
public final double
public double
getTx()

Overrides javafx.scene.transform.Transform.getTx.

Gets the X coordinate translation element of the 3x4 matrix.

public double
getTy()

Overrides javafx.scene.transform.Transform.getTy.

Gets the Y coordinate translation element of the 3x4 matrix.

public final double
getX()

public final double
getY()

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.scene.transform.Transform.inverseDeltaTransform.

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.scene.transform.Transform.inverseDeltaTransform.

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.scene.transform.Transform.inverseTransform.

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.scene.transform.Transform.inverseTransform.

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.scene.transform.Transform.inverseTransform2DPointsImpl.

Core of the inverseTransform2DPoints method.

pack-priv void
inverseTransform3DPointsImpl(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)

Overrides javafx.scene.transform.Transform.inverseTransform3DPointsImpl.

Core of the inverseTransform3DPoints method.

public final DoubleProperty
public final DoubleProperty
pack-priv void
prependTo(Affine
Affine instance to prepend to
a
)

Overrides javafx.scene.transform.Transform.prependTo.

Visitor from Affine class which provides an efficient prepend operation for the subclasses.

public final void
setPivotX(double value)

public final void
setPivotY(double value)

public final void
setX(double value)

public final void
setY(double value)

public String

Returns:

a string representation of this Shear object.
toString
()

Overrides java.lang.Object.toString.

Returns a string representation of this Shear object.

public Point2D
transform(double
the X coordinate of the point
x
,
double
the Y coordinate of the point
y
)

Overrides javafx.scene.transform.Transform.transform.

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.scene.transform.Transform.transform.

Transforms the specified point by this transform.

pack-priv void
transform2DPointsImpl(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)

Overrides javafx.scene.transform.Transform.transform2DPointsImpl.

Core of the transform2DPoints method.

pack-priv void
transform3DPointsImpl(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)

Overrides javafx.scene.transform.Transform.transform3DPointsImpl.

Core of the transform3DPoints method.

pack-priv void
validate()

Overrides javafx.scene.transform.Transform.validate.

Needed for the proper delivery of the TransformChangedEvent.

public final DoubleProperty
public final DoubleProperty
Inherited from javafx.scene.transform.Transform:
addaddEventFilteraddEventHandleraffineaffinebuildEventDispatchChaincheckRequestedMATclearInverseCachecolumncolumncreateImmutableTransformcreateImmutableTransformcreateImmutableTransformcreateImmutableTransformdeltaTransformdeltaTransformdeterminantensureCanTransform2DPointgetElementgetMxxgetMxzgetMyygetMyzgetMzxgetMzygetMzzgetOnTransformChangedgetTzidentityPropertyinverseDeltaTransforminverseDeltaTransforminverseTransforminverseTransforminverseTransforminverseTransform2DPointsinverseTransform3DPointsisIdentityisType2DonTransformChangedPropertyremoveremoveEventFilterremoveEventHandlerrotaterowrowscalescalesetOnTransformChangedshearshearsimilarTotoArraytoArraytransformtransformtransformtransform2DPointstransform3DPointstransformChangedtranslatetype2DProperty

Field Detail

pivotXback to summary
private DoubleProperty pivotX

Defines the X coordinate of the shear pivot point.

Default Value
0.0
pivotYback to summary
private DoubleProperty pivotY

Defines the Y coordinate of the shear pivot point.

Default Value
0.0
xback 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.

Default Value
0.0
yback 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.

Default Value
0.0

Constructor Detail

Shearback to summary
public Shear()

Creates a default Shear (identity).

Shearback to summary
public Shear(double x, double y)

Creates a new instance of Shear. The pivot point is set to (0,0)

Parameters
x:double

the multiplier by which coordinates are shifted in the direction of the positive X axis as a factor of their Y coordinate

y:double

the multiplier by which coordinates are shifted in the direction of the positive Y axis as a factor of their X coordinate

Shearback to summary
public Shear(double x, double y, double pivotX, double pivotY)

Creates a new instance of Shear with pivot.

Parameters
x:double

the multiplier by which coordinates are shifted in the direction of the positive X axis as a factor of their Y coordinate

y:double

the multiplier by which coordinates are shifted in the direction of the positive Y axis as a factor of their X coordinate

pivotX:double

the X coordinate of the shear pivot point

pivotY:double

the Y coordinate of the shear pivot point

Method Detail

appendToback to summary
pack-priv void appendTo(Affine a)

Overrides javafx.scene.transform.Transform.appendTo.

Doc from javafx.scene.transform.Transform.appendTo.

Visitor from Affine class which provides an efficient append operation for the subclasses.

Parameters
a:Affine

Affine instance to append to

Annotations
@Override
applyback to summary
pack-priv void apply(final Affine3D trans)

Implements abstract javafx.scene.transform.Transform.apply.

Annotations
@Override
cloneback to summary
public Shear clone()

Overrides javafx.scene.transform.Transform.clone.

Doc from javafx.scene.transform.Transform.clone.

Returns a deep copy of this transform.

Returns:Shear

a copy of this transform

Annotations
@Override
computeIs2Dback to summary
pack-priv boolean computeIs2D()

Overrides javafx.scene.transform.Transform.computeIs2D.

Doc from javafx.scene.transform.Transform.computeIs2D.

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.

Returns:boolean

true if this transform is currently 2D-only

Annotations
@Override
computeIsIdentityback to summary
pack-priv boolean computeIsIdentity()

Overrides javafx.scene.transform.Transform.computeIsIdentity.

Doc from javafx.scene.transform.Transform.computeIsIdentity.

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.

Returns:boolean

true if this transform is currently an identity transform

Annotations
@Override
createConcatenationback to summary
public Transform createConcatenation(Transform transform)

Overrides javafx.scene.transform.Transform.createConcatenation.

Doc from javafx.scene.transform.Transform.createConcatenation.

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 getTransforms() list, this transform first and the specified transform second.

Parameters
transform:Transform

transform to be concatenated with this transform

Returns:Transform

The concatenated transform

Annotations
@Override
createInverseback to summary
public Transform createInverse()

Overrides javafx.scene.transform.Transform.createInverse.

Doc from javafx.scene.transform.Transform.createInverse.

Returns the inverse transform of this transform.

Returns:Transform

the inverse transform

Annotations
@Override
deltaTransformback to summary
public Point2D deltaTransform(double x, double y)

Overrides javafx.scene.transform.Transform.deltaTransform.

Doc from javafx.scene.transform.Transform.deltaTransform.

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.

Parameters
x:double

vector magnitude in the direction of the X axis

y:double

vector magnitude in the direction of the Y axis

Returns:Point2D

the transformed relative magnitude vector represented by a Point2D instance

Annotations
@Override
deltaTransformback to summary
public Point3D deltaTransform(double x, double y, double z)

Overrides javafx.scene.transform.Transform.deltaTransform.

Doc from javafx.scene.transform.Transform.deltaTransform.

Transforms the relative magnitude vector by this transform. The vector is transformed without applying the translation components of the affine transformation matrix.

Parameters
x:double

vector magnitude in the direction of the X axis

y:double

vector magnitude in the direction of the Y axis

z:double

vector magnitude in the direction of the Z axis

Returns:Point3D

the transformed relative magnitude vector represented by a Point3D instance

Annotations
@Override
deriveback to summary
pack-priv BaseTransform derive(final BaseTransform trans)

Implements abstract javafx.scene.transform.Transform.derive.

Annotations
@Override
fill2DArrayback to summary
pack-priv void fill2DArray(double[] array)

Overrides javafx.scene.transform.Transform.fill2DArray.

Doc from javafx.scene.transform.Transform.fill2DArray.

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.

Parameters
array:double[]

array to be filled with the 6 2D elements

Annotations
@Override
fill3DArrayback to summary
pack-priv void fill3DArray(double[] array)

Overrides javafx.scene.transform.Transform.fill3DArray.

Doc from javafx.scene.transform.Transform.fill3DArray.

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.

Parameters
array:double[]

array to be filled with the 12 3D elements

Annotations
@Override
getMxyback to summary
public double getMxy()

Overrides javafx.scene.transform.Transform.getMxy.

Doc from javafx.scene.transform.Transform.getMxy.

Gets the XY coordinate element of the 3x4 matrix.

Returns:double

the XY coordinate element of the 3x4 matrix

Annotations
@Override
getMyxback to summary
public double getMyx()

Overrides javafx.scene.transform.Transform.getMyx.

Doc from javafx.scene.transform.Transform.getMyx.

Gets the YX coordinate element of the 3x4 matrix.

Returns:double

the YX coordinate element of the 3x4 matrix

Annotations
@Override
getPivotXback to summary
public final double getPivotX()
getPivotYback to summary
public final double getPivotY()
getTxback to summary
public double getTx()

Overrides javafx.scene.transform.Transform.getTx.

Doc from javafx.scene.transform.Transform.getTx.

Gets the X coordinate translation element of the 3x4 matrix.

Returns:double

the X coordinate translation element of the 3x4 matrix

Annotations
@Override
getTyback to summary
public double getTy()

Overrides javafx.scene.transform.Transform.getTy.

Doc from javafx.scene.transform.Transform.getTy.

Gets the Y coordinate translation element of the 3x4 matrix.

Returns:double

the Y coordinate translation element of the 3x4 matrix

Annotations
@Override
getXback to summary
public final double getX()
getYback to summary
public final double getY()
inverseDeltaTransformback to summary
public Point2D inverseDeltaTransform(double x, double y) throws NonInvertibleTransformException

Overrides javafx.scene.transform.Transform.inverseDeltaTransform.

Doc from javafx.scene.transform.Transform.inverseDeltaTransform.

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.

Parameters
x:double

vector magnitude in the direction of the X axis

y:double

vector magnitude in the direction of the Y axis

Returns:Point2D

the inversely transformed relative magnitude vector represented by a Point2D instance

Annotations
@Override
Exceptions
NonInvertibleTransformException:
if this transform cannot be inverted
inverseDeltaTransformback to summary
public Point3D inverseDeltaTransform(double x, double y, double z) throws NonInvertibleTransformException

Overrides javafx.scene.transform.Transform.inverseDeltaTransform.

Doc from javafx.scene.transform.Transform.inverseDeltaTransform.

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.

Parameters
x:double

vector magnitude in the direction of the X axis

y:double

vector magnitude in the direction of the Y axis

z:double

vector magnitude in the direction of the Z axis

Returns:Point3D

the inversely transformed relative magnitude vector represented by a Point3D instance

Annotations
@Override
Exceptions
NonInvertibleTransformException:
if this transform cannot be inverted
inverseTransformback to summary
public Point2D inverseTransform(double x, double y) throws NonInvertibleTransformException

Overrides javafx.scene.transform.Transform.inverseTransform.

Doc from javafx.scene.transform.Transform.inverseTransform.

Transforms the specified point by the inverse of this transform. This method can be used only for 2D transforms.

Parameters
x:double

the X coordinate of the point

y:double

the Y coordinate of the point

Returns:Point2D

the inversely transformed point

Annotations
@Override
Exceptions
NonInvertibleTransformException:
if this transform cannot be inverted
inverseTransformback to summary
public Point3D inverseTransform(double x, double y, double z) throws NonInvertibleTransformException

Overrides javafx.scene.transform.Transform.inverseTransform.

Doc from javafx.scene.transform.Transform.inverseTransform.

Transforms the specified point by the inverse of this transform.

Parameters
x:double

the X coordinate of the point

y:double

the Y coordinate of the point

z:double

the Z coordinate of the point

Returns:Point3D

the inversely transformed point

Annotations
@Override
Exceptions
NonInvertibleTransformException:
if this transform cannot be inverted
inverseTransform2DPointsImplback to summary
pack-priv void inverseTransform2DPointsImpl(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts) throws NonInvertibleTransformException

Overrides javafx.scene.transform.Transform.inverseTransform2DPointsImpl.

Doc from javafx.scene.transform.Transform.inverseTransform2DPointsImpl.

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.

Annotations
@Override
inverseTransform3DPointsImplback to summary
pack-priv void inverseTransform3DPointsImpl(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts) throws NonInvertibleTransformException

Overrides javafx.scene.transform.Transform.inverseTransform3DPointsImpl.

Doc from javafx.scene.transform.Transform.inverseTransform3DPointsImpl.

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.

Annotations
@Override
pivotXPropertyback to summary
public final DoubleProperty pivotXProperty()
pivotYPropertyback to summary
public final DoubleProperty pivotYProperty()
prependToback to summary
pack-priv void prependTo(Affine a)

Overrides javafx.scene.transform.Transform.prependTo.

Doc from javafx.scene.transform.Transform.prependTo.

Visitor from Affine class which provides an efficient prepend operation for the subclasses.

Parameters
a:Affine

Affine instance to prepend to

Annotations
@Override
setPivotXback to summary
public final void setPivotX(double value)
setPivotYback to summary
public final void setPivotY(double value)
setXback to summary
public final void setX(double value)
setYback to summary
public final void setY(double value)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Returns a string representation of this Shear object.

Returns:String

a string representation of this Shear object.

Annotations
@Override
transformback to summary
public Point2D transform(double x, double y)

Overrides javafx.scene.transform.Transform.transform.

Doc from javafx.scene.transform.Transform.transform.

Transforms the specified point by this transform. This method can be used only for 2D transforms.

Parameters
x:double

the X coordinate of the point

y:double

the Y coordinate of the point

Returns:Point2D

the transformed point

Annotations
@Override
transformback to summary
public Point3D transform(double x, double y, double z)

Overrides javafx.scene.transform.Transform.transform.

Doc from javafx.scene.transform.Transform.transform.

Transforms the specified point by this transform.

Parameters
x:double

the X coordinate of the point

y:double

the Y coordinate of the point

z:double

the Z coordinate of the point

Returns:Point3D

the transformed point

Annotations
@Override
transform2DPointsImplback to summary
pack-priv void transform2DPointsImpl(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)

Overrides javafx.scene.transform.Transform.transform2DPointsImpl.

Doc from javafx.scene.transform.Transform.transform2DPointsImpl.

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.

Annotations
@Override
transform3DPointsImplback to summary
pack-priv void transform3DPointsImpl(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)

Overrides javafx.scene.transform.Transform.transform3DPointsImpl.

Doc from javafx.scene.transform.Transform.transform3DPointsImpl.

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.

Annotations
@Override
validateback to summary
pack-priv void validate()

Overrides javafx.scene.transform.Transform.validate.

Doc from javafx.scene.transform.Transform.validate.

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.

Annotations
@Override
xPropertyback to summary
public final DoubleProperty xProperty()
yPropertyback to summary
public final DoubleProperty yProperty()