public interface Transform
Modifier and Type | Method and Description |
---|---|
Transform |
clone()
Deprecated.
Use
copy() . |
Transform |
concatenate(Transform other)
Returns a new transform comprised of the concatenation of
other to this transform
(i.e. |
Transform |
copy()
Returns a copy of this transform.
|
int |
generality()
Returns an integer that increases monotonically with the generality of the transform
implementation.
|
void |
get(double[] matrix)
Copies the affine transform matrix into the supplied array.
|
Point |
inverseTransform(IPoint p,
Point into)
Inverse transforms the supplied point, writing the result into
into . |
Vector |
inverseTransform(IVector v,
Vector into)
Inverse transforms the supplied vector, writing the result into
into . |
Transform |
invert()
Returns a new transform that represents the inverse of this transform.
|
Transform |
lerp(Transform other,
double t)
Returns a new transform comprised of the linear interpolation between this transform and
the specified other.
|
Transform |
preConcatenate(Transform other)
Returns a new transform comprised of the concatenation of this transform to
other
(i.e. |
Transform |
rotate(double angle)
Rotates this transform.
|
double |
rotation()
Returns the rotation applied by this transform.
|
Vector |
scale()
Returns the scale vector for this transform.
|
Transform |
scale(double scaleX,
double scaleY)
Scales this transform by the specified amount in the x and y dimensions.
|
double |
scaleX()
Returns the x-component of the scale applied by this transform.
|
Transform |
scaleX(double scaleX)
Scales this transform by the specified amount in the x dimension.
|
double |
scaleY()
Returns the y-component of the scale applied by this transform.
|
Transform |
scaleY(double scaleY)
Scales this transform by the specified amount in the y dimension.
|
Transform |
setRotation(double angle)
Sets the rotation component of this transform.
|
Transform |
setScale(double scaleX,
double scaleY)
Sets the x and y scale of this transform.
|
Transform |
setScaleX(double scaleX)
Sets the x scale of this transform.
|
Transform |
setScaleY(double scaleY)
Sets the y scale of this transform.
|
Transform |
setTransform(double m00,
double m01,
double m10,
double m11,
double tx,
double ty)
Sets the affine transform matrix.
|
Transform |
setTranslation(double tx,
double ty)
Sets the translation component of this transform.
|
Transform |
setTx(double tx)
Sets the x-component of this transform's translation.
|
Transform |
setTy(double ty)
Sets the y-component of this transform's translation.
|
Transform |
setUniformScale(double scale)
Sets the uniform scale of this transform.
|
Transform |
shear(double tx,
double ty)
Shears this transform.
|
Transform |
shearX(double tx)
Shears this transform in the x dimension.
|
Transform |
shearY(double ty)
Shears this transform in the y dimension.
|
void |
transform(double[] src,
int srcOff,
double[] dst,
int dstOff,
int count)
Transforms the supplied points.
|
void |
transform(IPoint[] src,
int srcOff,
Point[] dst,
int dstOff,
int count)
Transforms the supplied points.
|
Point |
transform(IPoint p,
Point into)
Transforms the supplied point, writing the result into
into . |
Vector |
transform(IVector v,
Vector into)
Transforms the supplied vector, writing the result into
into . |
Vector |
transformPoint(IVector v,
Vector into)
Transforms the supplied vector as a point (accounting for translation), writing the result
into
into . |
Transform |
translate(double tx,
double ty)
Translates this transform.
|
Transform |
translateX(double tx)
Translates this transform in the x dimension.
|
Transform |
translateY(double ty)
Translates this transform in the y dimension.
|
Vector |
translation()
Returns the translation vector for this transform.
|
double |
tx()
Returns the x-coordinate of the translation component.
|
double |
ty()
Returns the y-coordinate of the translation component.
|
double |
uniformScale()
Returns the uniform scale applied by this transform.
|
Transform |
uniformScale(double scale)
Scales this transform in a uniform manner by the specified amount.
|
double uniformScale()
Vector scale()
double scaleX()
double scaleY()
double rotation()
NoninvertibleTransformException
- if the transform is not invertible.Vector translation()
double tx()
double ty()
void get(double[] matrix)
matrix
- the array which receives m00, m01, m10, m11, tx, ty
.Transform setUniformScale(double scale)
IllegalArgumentException
- if the supplied scale is zero.UnsupportedOperationException
- if the transform is not uniform or greater.Transform setScale(double scaleX, double scaleY)
IllegalArgumentException
- if either supplied scale is zero.UnsupportedOperationException
- if the transform is not non-uniform or greater.Transform setScaleX(double scaleX)
IllegalArgumentException
- if the supplied scale is zero.UnsupportedOperationException
- if the transform is not non-uniform or greater.Transform setScaleY(double scaleY)
IllegalArgumentException
- if the supplied scale is zero.UnsupportedOperationException
- if the transform is not non-uniform or greater.Transform setRotation(double angle)
UnsupportedOperationException
- if the transform is not rigid body or greater.Transform setTranslation(double tx, double ty)
UnsupportedOperationException
- if the transform is not rigid body or greater.Transform setTx(double tx)
UnsupportedOperationException
- if the transform is not rigid body or greater.Transform setTy(double ty)
UnsupportedOperationException
- if the transform is not rigid body or greater.Transform setTransform(double m00, double m01, double m10, double m11, double tx, double ty)
UnsupportedOperationException
- if the transform is not affine or greater.Transform uniformScale(double scale)
IllegalArgumentException
- if the supplied scale is zero.UnsupportedOperationException
- if the transform is not uniform or greater.Transform scale(double scaleX, double scaleY)
IllegalArgumentException
- if either supplied scale is zero.UnsupportedOperationException
- if the transform is not non-uniform or greater.Transform scaleX(double scaleX)
IllegalArgumentException
- if the supplied scale is zero.UnsupportedOperationException
- if the transform is not non-uniform or greater.Transform scaleY(double scaleY)
IllegalArgumentException
- if the supplied scale is zero.UnsupportedOperationException
- if the transform is not non-uniform or greater.Transform rotate(double angle)
UnsupportedOperationException
- if the transform is not rigid body or greater.Transform translate(double tx, double ty)
UnsupportedOperationException
- if the transform is not rigid body or greater.Transform translateX(double tx)
UnsupportedOperationException
- if the transform is not rigid body or greater.Transform translateY(double ty)
UnsupportedOperationException
- if the transform is not rigid body or greater.Transform shear(double tx, double ty)
UnsupportedOperationException
- if the transform is not affine or greater.Transform shearX(double tx)
UnsupportedOperationException
- if the transform is not affine or greater.Transform shearY(double ty)
UnsupportedOperationException
- if the transform is not affine or greater.Transform invert()
NoninvertibleTransformException
- if the transform is not invertible.Transform concatenate(Transform other)
other
to this transform
(i.e. this x other
).Transform preConcatenate(Transform other)
other
(i.e. other x this
).Transform lerp(Transform other, double t)
Point transform(IPoint p, Point into)
into
.into
- a point into which to store the result, may be the same object as p
.into
for chaining.void transform(IPoint[] src, int srcOff, Point[] dst, int dstOff, int count)
src
- the points to be transformed.srcOff
- the offset into the src
array at which to start.dst
- the points into which to store the transformed points. May be src
.dstOff
- the offset into the dst
array at which to start.count
- the number of points to transform.void transform(double[] src, int srcOff, double[] dst, int dstOff, int count)
src
- the points to be transformed (as [x, y, x, y, ...]
).srcOff
- the offset into the src
array at which to start.dst
- the points into which to store the transformed points. May be src
.dstOff
- the offset into the dst
array at which to start.count
- the number of points to transform.Point inverseTransform(IPoint p, Point into)
into
.into
- a point into which to store the result, may be the same object as p
.into
, for chaining.NoninvertibleTransformException
- if the transform is not invertible.Vector transformPoint(IVector v, Vector into)
into
.into
- a vector into which to store the result, may be the same object as v
.into
, for chaining.Vector transform(IVector v, Vector into)
into
.into
- a vector into which to store the result, may be the same object as v
.into
, for chaining.Vector inverseTransform(IVector v, Vector into)
into
.into
- a vector into which to store the result, may be the same object as v
.into
, for chaining.NoninvertibleTransformException
- if the transform is not invertible.@Deprecated Transform clone()
copy()
.Transform copy()
int generality()
Copyright © 2017. All rights reserved.