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(float[] 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,
float 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(float angle)
Rotates this transform.
|
float |
rotation()
Returns the rotation applied by this transform.
|
Vector |
scale()
Returns the scale vector for this transform.
|
Transform |
scale(float scaleX,
float scaleY)
Scales this transform by the specified amount in the x and y dimensions.
|
float |
scaleX()
Returns the x-component of the scale applied by this transform.
|
Transform |
scaleX(float scaleX)
Scales this transform by the specified amount in the x dimension.
|
float |
scaleY()
Returns the y-component of the scale applied by this transform.
|
Transform |
scaleY(float scaleY)
Scales this transform by the specified amount in the y dimension.
|
Transform |
setRotation(float angle)
Sets the rotation component of this transform.
|
Transform |
setScale(float scaleX,
float scaleY)
Sets the x and y scale of this transform.
|
Transform |
setScaleX(float scaleX)
Sets the x scale of this transform.
|
Transform |
setScaleY(float scaleY)
Sets the y scale of this transform.
|
Transform |
setTransform(float m00,
float m01,
float m10,
float m11,
float tx,
float ty)
Sets the affine transform matrix.
|
Transform |
setTranslation(float tx,
float ty)
Sets the translation component of this transform.
|
Transform |
setTx(float tx)
Sets the x-component of this transform's translation.
|
Transform |
setTy(float ty)
Sets the y-component of this transform's translation.
|
Transform |
setUniformScale(float scale)
Sets the uniform scale of this transform.
|
Transform |
shear(float tx,
float ty)
Shears this transform.
|
Transform |
shearX(float tx)
Shears this transform in the x dimension.
|
Transform |
shearY(float ty)
Shears this transform in the y dimension.
|
void |
transform(float[] src,
int srcOff,
float[] 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(float tx,
float ty)
Translates this transform.
|
Transform |
translateX(float tx)
Translates this transform in the x dimension.
|
Transform |
translateY(float ty)
Translates this transform in the y dimension.
|
Vector |
translation()
Returns the translation vector for this transform.
|
float |
tx()
Returns the x-coordinate of the translation component.
|
float |
ty()
Returns the y-coordinate of the translation component.
|
float |
uniformScale()
Returns the uniform scale applied by this transform.
|
Transform |
uniformScale(float scale)
Scales this transform in a uniform manner by the specified amount.
|
float uniformScale()
Vector scale()
float scaleX()
float scaleY()
float rotation()
NoninvertibleTransformException
- if the transform is not invertible.Vector translation()
float tx()
float ty()
void get(float[] matrix)
matrix
- the array which receives m00, m01, m10, m11, tx, ty
.Transform setUniformScale(float scale)
IllegalArgumentException
- if the supplied scale is zero.UnsupportedOperationException
- if the transform is not uniform or greater.Transform setScale(float scaleX, float scaleY)
IllegalArgumentException
- if either supplied scale is zero.UnsupportedOperationException
- if the transform is not non-uniform or greater.Transform setScaleX(float scaleX)
IllegalArgumentException
- if the supplied scale is zero.UnsupportedOperationException
- if the transform is not non-uniform or greater.Transform setScaleY(float scaleY)
IllegalArgumentException
- if the supplied scale is zero.UnsupportedOperationException
- if the transform is not non-uniform or greater.Transform setRotation(float angle)
UnsupportedOperationException
- if the transform is not rigid body or greater.Transform setTranslation(float tx, float ty)
UnsupportedOperationException
- if the transform is not rigid body or greater.Transform setTx(float tx)
UnsupportedOperationException
- if the transform is not rigid body or greater.Transform setTy(float ty)
UnsupportedOperationException
- if the transform is not rigid body or greater.Transform setTransform(float m00, float m01, float m10, float m11, float tx, float ty)
UnsupportedOperationException
- if the transform is not affine or greater.Transform uniformScale(float scale)
IllegalArgumentException
- if the supplied scale is zero.UnsupportedOperationException
- if the transform is not uniform or greater.Transform scale(float scaleX, float scaleY)
IllegalArgumentException
- if either supplied scale is zero.UnsupportedOperationException
- if the transform is not non-uniform or greater.Transform scaleX(float scaleX)
IllegalArgumentException
- if the supplied scale is zero.UnsupportedOperationException
- if the transform is not non-uniform or greater.Transform scaleY(float scaleY)
IllegalArgumentException
- if the supplied scale is zero.UnsupportedOperationException
- if the transform is not non-uniform or greater.Transform rotate(float angle)
UnsupportedOperationException
- if the transform is not rigid body or greater.Transform translate(float tx, float ty)
UnsupportedOperationException
- if the transform is not rigid body or greater.Transform translateX(float tx)
UnsupportedOperationException
- if the transform is not rigid body or greater.Transform translateY(float ty)
UnsupportedOperationException
- if the transform is not rigid body or greater.Transform shear(float tx, float ty)
UnsupportedOperationException
- if the transform is not affine or greater.Transform shearX(float tx)
UnsupportedOperationException
- if the transform is not affine or greater.Transform shearY(float 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, float 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(float[] src, int srcOff, float[] 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.