Top Description Fields Constructors Methods
javafx.scene.transform

public Class Scale

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 scales coordinates by the specified factors. The matrix representing the scaling transformation around a pivot point (pivotX, pivotY, pivotZ) with scaling factors x, y and z is as follows:
             [   x   0   0   (1-x)*pivotX   ]
             [   0   y   0   (1-y)*pivotY   ]
             [   0   0   z   (1-z)*pivotZ   ]
Since
JavaFX 2.0

Field Summary

Modifier and TypeField and Description
private DoubleProperty
pivotX

Defines the X coordinate about which point the scale occurs.

private DoubleProperty
pivotY

Defines the Y coordinate about which point the scale occurs.

private DoubleProperty
pivotZ

Defines the Z coordinate about which point the scale occurs.

private DoubleProperty
x

Defines the factor by which coordinates are scaled along the X axis direction.

private DoubleProperty
y

Defines the factor by which coordinates are scaled along the Y axis direction.

private DoubleProperty
z

Defines the factor by which coordinates are scaled along the Z axis direction.

Constructor Summary

AccessConstructor and Description
public
Scale()

Creates a default Scale (identity).

public
Scale(double
the factor by which coordinates are scaled along the X axis
x
,
double
the factor by which coordinates are scaled along the Y axis
y
)

Creates a two-dimensional Scale.

public
Scale(double
the factor by which coordinates are scaled along the X axis
x
,
double
the factor by which coordinates are scaled along the Y axis
y
,
double
the X coordinate about which point the scale occurs
pivotX
,
double
the Y coordinate about which point the scale occurs
pivotY
)

Creates a two-dimensional Scale with pivot.

public
Scale(double
the factor by which coordinates are scaled along the X axis
x
,
double
the factor by which coordinates are scaled along the Y axis
y
,
double
the factor by which coordinates are scaled along the Z axis
z
)

Creates a three-dimensional Scale.

public
Scale(double
the factor by which coordinates are scaled along the X axis
x
,
double
the factor by which coordinates are scaled along the Y axis
y
,
double
the factor by which coordinates are scaled along the Z axis
z
,
double
the X coordinate about which point the scale occurs
pivotX
,
double
the Y coordinate about which point the scale occurs
pivotY
,
double
the Z coordinate about which point the scale occurs
pivotZ
)

Creates a three-dimensional Scale with pivot.

Method Summary

Modifier and TypeMethod and Description
pack-priv void
appendTo(Affine 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 Scale
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)

Overrides javafx.scene.transform.Transform.createConcatenation.

Returns the concatenation of this transform and the specified transform.

public Scale
createInverse()

Overrides javafx.scene.transform.Transform.createInverse.

Returns the inverse transform of this transform.

public Point2D
deltaTransform(double x, double y)

Overrides javafx.scene.transform.Transform.deltaTransform.

Transforms the relative magnitude vector by this transform.

public Point3D
deltaTransform(double x, double y, double z)

Overrides javafx.scene.transform.Transform.deltaTransform.

Transforms the relative magnitude vector by this transform.

pack-priv BaseTransform
pack-priv void
fill2DArray(double[] array)

Overrides javafx.scene.transform.Transform.fill2DArray.

Core of the toArray implementation for the 2D case.

pack-priv void
fill3DArray(double[] array)

Overrides javafx.scene.transform.Transform.fill3DArray.

Core of the toArray implementation for the 3D case.

public double
getMxx()

Overrides javafx.scene.transform.Transform.getMxx.

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

public double
getMyy()

Overrides javafx.scene.transform.Transform.getMyy.

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

public double
getMzz()

Overrides javafx.scene.transform.Transform.getMzz.

Gets the Z coordinate scaling element of the 3x4 matrix.

public final double
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 double
getTz()

Overrides javafx.scene.transform.Transform.getTz.

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

public final double
getX()

public final double
getY()

public final double
getZ()

public Point2D
inverseDeltaTransform(double x, double y)

Overrides javafx.scene.transform.Transform.inverseDeltaTransform.

Transforms the relative magnitude vector by the inverse of this transform.

public Point3D
inverseDeltaTransform(double x, double y, double z)

Overrides javafx.scene.transform.Transform.inverseDeltaTransform.

Transforms the relative magnitude vector by the inverse of this transform.

public Point2D
inverseTransform(double x, double y)

Overrides javafx.scene.transform.Transform.inverseTransform.

Transforms the specified point by the inverse of this transform.

public Point3D
inverseTransform(double x, double y, double 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
public final DoubleProperty
pack-priv void
prependTo(Affine 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
setPivotZ(double value)

public final void
setX(double value)

public final void
setY(double value)

public final void
setZ(double value)

public String

Returns:

a string representation of this Scale object.
toString
()

Overrides java.lang.Object.toString.

Returns a string representation of this Scale object.

public Point2D
transform(double x, double y)

Overrides javafx.scene.transform.Transform.transform.

Transforms the specified point by this transform.

public Point3D
transform(double x, double y, double 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
public final DoubleProperty
Inherited from javafx.scene.transform.Transform:
addaddEventFilteraddEventHandleraffineaffinebuildEventDispatchChaincheckRequestedMATclearInverseCachecolumncolumncreateImmutableTransformcreateImmutableTransformcreateImmutableTransformcreateImmutableTransformdeltaTransformdeltaTransformdeterminantensureCanTransform2DPointgetElementgetMxygetMxzgetMyxgetMyzgetMzxgetMzygetOnTransformChangedidentityPropertyinverseDeltaTransforminverseDeltaTransforminverseTransforminverseTransforminverseTransforminverseTransform2DPointsinverseTransform3DPointsisIdentityisType2DonTransformChangedPropertyremoveremoveEventFilterremoveEventHandlerrotaterowrowscalescalesetOnTransformChangedshearshearsimilarTotoArraytoArraytransformtransformtransformtransform2DPointstransform3DPointstransformChangedtranslatetype2DProperty

Field Detail

pivotXback to summary
private DoubleProperty pivotX

Defines the X coordinate about which point the scale occurs.

Default Value
0.0
pivotYback to summary
private DoubleProperty pivotY

Defines the Y coordinate about which point the scale occurs.

Default Value
0.0
pivotZback to summary
private DoubleProperty pivotZ

Defines the Z coordinate about which point the scale occurs.

Default Value
0.0
xback to summary
private DoubleProperty x

Defines the factor by which coordinates are scaled along the X axis direction. The default value is 1.0.

yback to summary
private DoubleProperty y

Defines the factor by which coordinates are scaled along the Y axis direction. The default value is 1.0.

zback to summary
private DoubleProperty z

Defines the factor by which coordinates are scaled along the Z axis direction. The default value is 1.0.

Constructor Detail

Scaleback to summary
public Scale()

Creates a default Scale (identity).

Scaleback to summary
public Scale(double x, double y)

Creates a two-dimensional Scale. The pivot point is set to (0,0)

Parameters
x:double

the factor by which coordinates are scaled along the X axis

y:double

the factor by which coordinates are scaled along the Y axis

Scaleback to summary
public Scale(double x, double y, double pivotX, double pivotY)

Creates a two-dimensional Scale with pivot.

Parameters
x:double

the factor by which coordinates are scaled along the X axis

y:double

the factor by which coordinates are scaled along the Y axis

pivotX:double

the X coordinate about which point the scale occurs

pivotY:double

the Y coordinate about which point the scale occurs

Scaleback to summary
public Scale(double x, double y, double z)

Creates a three-dimensional Scale. The pivot point is set to (0,0,0)

Parameters
x:double

the factor by which coordinates are scaled along the X axis

y:double

the factor by which coordinates are scaled along the Y axis

z:double

the factor by which coordinates are scaled along the Z axis

Scaleback to summary
public Scale(double x, double y, double z, double pivotX, double pivotY, double pivotZ)

Creates a three-dimensional Scale with pivot.

Parameters
x:double

the factor by which coordinates are scaled along the X axis

y:double

the factor by which coordinates are scaled along the Y axis

z:double

the factor by which coordinates are scaled along the Z axis

pivotX:double

the X coordinate about which point the scale occurs

pivotY:double

the Y coordinate about which point the scale occurs

pivotZ:double

the Z coordinate about which point the scale occurs

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.

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 Scale clone()

Overrides javafx.scene.transform.Transform.clone.

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

Returns a deep 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.

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.

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.

Annotations
@Override
createInverseback to summary
public Scale createInverse() throws NonInvertibleTransformException

Overrides javafx.scene.transform.Transform.createInverse.

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

Returns the inverse transform of this transform.

Annotations
@Override
Exceptions
NonInvertibleTransformException:
if this transform cannot be inverted
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.

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.

Annotations
@Override
deriveback to summary
pack-priv BaseTransform derive(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.

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.

Annotations
@Override
getMxxback to summary
public double getMxx()

Overrides javafx.scene.transform.Transform.getMxx.

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

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

Annotations
@Override
getMyyback to summary
public double getMyy()

Overrides javafx.scene.transform.Transform.getMyy.

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

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

Annotations
@Override
getMzzback to summary
public double getMzz()

Overrides javafx.scene.transform.Transform.getMzz.

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

Gets the Z coordinate scaling element of the 3x4 matrix.

Annotations
@Override
getPivotXback to summary
public final double getPivotX()
getPivotYback to summary
public final double getPivotY()
getPivotZback to summary
public final double getPivotZ()
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.

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.

Annotations
@Override
getTzback to summary
public double getTz()

Overrides javafx.scene.transform.Transform.getTz.

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

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

Annotations
@Override
getXback to summary
public final double getX()
getYback to summary
public final double getY()
getZback to summary
public final double getZ()
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.

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.

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.

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.

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()
pivotZPropertyback to summary
public final DoubleProperty pivotZProperty()
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.

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

Overrides java.lang.Object.toString.

Returns a string representation of this Scale object.

Returns:String

a string representation of this Scale 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.

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.

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()
zPropertyback to summary
public final DoubleProperty zProperty()