public class Shear extends Transform
Affine
object that shears coordinates
by the specified multipliers. The matrix representing the shearing
transformation 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));
Type | Property and Description |
---|---|
DoubleProperty |
pivotX
Defines the X coordinate of the shear pivot point.
|
DoubleProperty |
pivotY
Defines the Y coordinate of the shear pivot point.
|
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.
|
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.
|
identity, onTransformChanged, type2D
Constructor and Description |
---|
Shear()
Creates a default Shear (identity).
|
Shear(double x,
double y)
Creates a new instance of Shear.
|
Shear(double x,
double y,
double pivotX,
double pivotY)
Creates a new instance of Shear with pivot.
|
Modifier and Type | Method and Description |
---|---|
Shear |
clone()
Returns a deep copy of this transform.
|
Transform |
createConcatenation(Transform transform)
Returns the concatenation of this transform and the specified transform.
|
Transform |
createInverse()
Returns the inverse transform of this transform.
|
Point2D |
deltaTransform(double x,
double y)
Transforms the relative magnitude vector by this transform.
|
Point3D |
deltaTransform(double x,
double y,
double z)
Transforms the relative magnitude vector by this transform.
|
double |
getMxy()
Gets the XY coordinate element of the 3x4 matrix.
|
double |
getMyx()
Gets the YX coordinate element of the 3x4 matrix.
|
double |
getPivotX()
Gets the value of the property pivotX.
|
double |
getPivotY()
Gets the value of the property pivotY.
|
double |
getTx()
Gets the X coordinate translation element of the 3x4 matrix.
|
double |
getTy()
Gets the Y coordinate translation element of the 3x4 matrix.
|
double |
getX()
Gets the value of the property x.
|
double |
getY()
Gets the value of the property y.
|
Point2D |
inverseDeltaTransform(double x,
double y)
Transforms the relative magnitude vector by the inverse of this transform.
|
Point3D |
inverseDeltaTransform(double x,
double y,
double z)
Transforms the relative magnitude vector by the inverse of this transform.
|
Point2D |
inverseTransform(double x,
double y)
Transforms the specified point by the inverse of this transform.
|
Point3D |
inverseTransform(double x,
double y,
double z)
Transforms the specified point by the inverse of this transform.
|
DoubleProperty |
pivotXProperty()
Defines the X coordinate of the shear pivot point.
|
DoubleProperty |
pivotYProperty()
Defines the Y coordinate of the shear pivot point.
|
void |
setPivotX(double value)
Sets the value of the property pivotX.
|
void |
setPivotY(double value)
Sets the value of the property pivotY.
|
void |
setX(double value)
Sets the value of the property x.
|
void |
setY(double value)
Sets the value of the property y.
|
String |
toString()
Returns a string representation of this
Shear object. |
Point2D |
transform(double x,
double y)
Transforms the specified point by this transform.
|
Point3D |
transform(double x,
double y,
double z)
Transforms the specified point by this transform.
|
DoubleProperty |
xProperty()
Defines the multiplier by which coordinates are shifted in the direction
of the positive X axis as a factor of their Y coordinate.
|
DoubleProperty |
yProperty()
Defines the multiplier by which coordinates are shifted in the direction
of the positive Y axis as a factor of their X coordinate.
|
addEventFilter, addEventHandler, affine, affine, buildEventDispatchChain, column, column, deltaTransform, deltaTransform, determinant, getElement, getMxx, getMxz, getMyy, getMyz, getMzx, getMzy, getMzz, getOnTransformChanged, getTz, identityProperty, inverseDeltaTransform, inverseDeltaTransform, inverseTransform, inverseTransform, inverseTransform, inverseTransform2DPoints, inverseTransform3DPoints, isIdentity, isType2D, onTransformChangedProperty, removeEventFilter, removeEventHandler, rotate, row, row, scale, scale, setOnTransformChanged, shear, shear, similarTo, toArray, toArray, transform, transform, transform, transform2DPoints, transform3DPoints, transformChanged, translate, type2DProperty
public final DoubleProperty xProperty
getX()
,
setX(double)
public final DoubleProperty yProperty
getY()
,
setY(double)
public final DoubleProperty pivotXProperty
getPivotX()
,
setPivotX(double)
public final DoubleProperty pivotYProperty
getPivotY()
,
setPivotY(double)
public Shear()
public Shear(double x, double y)
x
- the multiplier by which coordinates are shifted in the direction
of the positive X axis as a factor of their Y coordinatey
- the multiplier by which coordinates are shifted in the direction
of the positive Y axis as a factor of their X coordinatepublic Shear(double x, double y, double pivotX, double pivotY)
x
- the multiplier by which coordinates are shifted in the direction
of the positive X axis as a factor of their Y coordinatey
- the multiplier by which coordinates are shifted in the direction
of the positive Y axis as a factor of their X coordinatepivotX
- the X coordinate of the shear pivot pointpivotY
- the Y coordinate of the shear pivot pointpublic final void setX(double value)
public final double getX()
public final DoubleProperty xProperty()
getX()
,
setX(double)
public final void setY(double value)
public final double getY()
public final DoubleProperty yProperty()
getY()
,
setY(double)
public final void setPivotX(double value)
public final double getPivotX()
public final DoubleProperty pivotXProperty()
getPivotX()
,
setPivotX(double)
public final void setPivotY(double value)
public final double getPivotY()
public final DoubleProperty pivotYProperty()
getPivotY()
,
setPivotY(double)
public double getMxy()
Transform
public double getMyx()
Transform
public double getTx()
Transform
public double getTy()
Transform
public Transform createConcatenation(Transform transform)
Transform
getTransforms()
list,
this
transform first and the specified transform
second.createConcatenation
in class Transform
transform
- transform to be concatenated with this transformpublic Transform createInverse()
Transform
createInverse
in class Transform
public Shear clone()
Transform
public Point2D transform(double x, double y)
Transform
public Point3D transform(double x, double y, double z)
Transform
public Point2D deltaTransform(double x, double y)
Transform
deltaTransform
in class Transform
x
- vector magnitude in the direction of the X axisy
- vector magnitude in the direction of the Y axisPoint2D
instancepublic Point3D deltaTransform(double x, double y, double z)
Transform
deltaTransform
in class Transform
x
- vector magnitude in the direction of the X axisy
- vector magnitude in the direction of the Y axisPoint3D
instancepublic Point2D inverseTransform(double x, double y) throws NonInvertibleTransformException
Transform
inverseTransform
in class Transform
x
- the X coordinate of the pointy
- the Y coordinate of the pointNonInvertibleTransformException
- if this transform
cannot be invertedpublic Point3D inverseTransform(double x, double y, double z) throws NonInvertibleTransformException
Transform
inverseTransform
in class Transform
x
- the X coordinate of the pointy
- the Y coordinate of the pointz
- the Z coordinate of the pointNonInvertibleTransformException
- if this transform
cannot be invertedpublic Point2D inverseDeltaTransform(double x, double y) throws NonInvertibleTransformException
Transform
inverseDeltaTransform
in class Transform
x
- vector magnitude in the direction of the X axisy
- vector magnitude in the direction of the Y axisPoint2D
instanceNonInvertibleTransformException
- if this transform
cannot be invertedpublic Point3D inverseDeltaTransform(double x, double y, double z) throws NonInvertibleTransformException
Transform
inverseDeltaTransform
in class Transform
x
- vector magnitude in the direction of the X axisy
- vector magnitude in the direction of the Y axisPoint3D
instanceNonInvertibleTransformException
- if this transform
cannot be invertedSubmit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 2008, 2017, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.