public class AffineTransform extends AbstractTransform
[ m00, m10, tx ]
[ m01, m11, ty ]
[ 0, 0, 1 ]
| Modifier and Type | Field and Description |
|---|---|
static int |
GENERALITY
Identifies the affine transform in
generality(). |
float |
m00
The scale, rotation and shear components of this transform.
|
float |
m01
The scale, rotation and shear components of this transform.
|
float |
m10
The scale, rotation and shear components of this transform.
|
float |
m11
The scale, rotation and shear components of this transform.
|
float |
tx
The translation components of this transform.
|
float |
ty
The translation components of this transform.
|
| Constructor and Description |
|---|
AffineTransform()
Creates an affine transform configured with the identity transform.
|
AffineTransform(float scale,
float angle,
float tx,
float ty)
Creates an affine transform from the supplied scale, rotation and translation.
|
AffineTransform(float scaleX,
float scaleY,
float angle,
float tx,
float ty)
Creates an affine transform from the supplied scale, rotation and translation.
|
AffineTransform(float m00,
float m01,
float m10,
float m11,
float tx,
float ty)
Creates an affine transform with the specified transform matrix.
|
| Modifier and Type | Method and Description |
|---|---|
Transform |
concatenate(Transform other)
Returns a new transform comprised of the concatenation of
other to this transform
(i.e. |
AffineTransform |
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. |
AffineTransform |
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. |
AffineTransform |
rotate(float angle)
Rotates this transform.
|
float |
rotation()
Returns the rotation applied by this transform.
|
AffineTransform |
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.
|
AffineTransform |
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.
|
AffineTransform |
scaleY(float scaleY)
Scales this transform by the specified amount in the y dimension.
|
AffineTransform |
set(AffineTransform other)
Sets this affine transform matrix to
other. |
AffineTransform |
setRotation(float angle)
Sets the rotation component of this transform.
|
AffineTransform |
setScaleX(float scaleX)
Sets the x scale of this transform.
|
AffineTransform |
setScaleY(float scaleY)
Sets the y scale of this transform.
|
AffineTransform |
setTransform(float m00,
float m01,
float m10,
float m11,
float tx,
float ty)
Sets the affine transform matrix.
|
AffineTransform |
setTranslation(float tx,
float ty)
Sets the translation component of this transform.
|
AffineTransform |
setTx(float tx)
Sets the x-component of this transform's translation.
|
AffineTransform |
setTy(float ty)
Sets the y-component of this transform's translation.
|
AffineTransform |
setUniformScale(float scale)
Sets the uniform scale of this transform.
|
AffineTransform |
shear(float sx,
float sy)
Shears this transform.
|
AffineTransform |
shearX(float sx)
Shears this transform in the x dimension.
|
AffineTransform |
shearY(float sy)
Shears this transform in the y dimension.
|
String |
toString() |
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. |
AffineTransform |
translate(float tx,
float ty)
Translates this transform.
|
AffineTransform |
translateX(float tx)
Translates this transform in the x dimension.
|
AffineTransform |
translateY(float ty)
Translates this transform in the y dimension.
|
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.
|
AffineTransform |
uniformScale(float scale)
Scales this transform in a uniform manner by the specified amount.
|
clone, scale, setScale, translationpublic static final int GENERALITY
generality().public float m00
public float m01
public float m10
public float m11
public float tx
public float ty
public AffineTransform()
public AffineTransform(float scale,
float angle,
float tx,
float ty)
public AffineTransform(float scaleX,
float scaleY,
float angle,
float tx,
float ty)
public AffineTransform(float m00,
float m01,
float m10,
float m11,
float tx,
float ty)
public AffineTransform set(AffineTransform other)
other.public float uniformScale()
Transformpublic float scaleX()
Transformpublic float scaleY()
Transformpublic float rotation()
Transformpublic float tx()
Transformpublic float ty()
Transformpublic void get(float[] matrix)
Transformmatrix - the array which receives m00, m01, m10, m11, tx, ty.public AffineTransform setUniformScale(float scale)
TransformsetUniformScale in interface TransformsetUniformScale in class AbstractTransformpublic AffineTransform setScaleX(float scaleX)
TransformsetScaleX in interface TransformsetScaleX in class AbstractTransformpublic AffineTransform setScaleY(float scaleY)
TransformsetScaleY in interface TransformsetScaleY in class AbstractTransformpublic AffineTransform setRotation(float angle)
TransformsetRotation in interface TransformsetRotation in class AbstractTransformpublic AffineTransform setTranslation(float tx, float ty)
TransformsetTranslation in interface TransformsetTranslation in class AbstractTransformpublic AffineTransform setTx(float tx)
TransformsetTx in interface TransformsetTx in class AbstractTransformpublic AffineTransform setTy(float ty)
TransformsetTy in interface TransformsetTy in class AbstractTransformpublic AffineTransform setTransform(float m00, float m01, float m10, float m11, float tx, float ty)
TransformsetTransform in interface TransformsetTransform in class AbstractTransformpublic AffineTransform uniformScale(float scale)
TransformuniformScale in interface TransformuniformScale in class AbstractTransformpublic AffineTransform scale(float scaleX, float scaleY)
Transformscale in interface Transformscale in class AbstractTransformpublic AffineTransform scaleX(float scaleX)
TransformscaleX in interface TransformscaleX in class AbstractTransformpublic AffineTransform scaleY(float scaleY)
TransformscaleY in interface TransformscaleY in class AbstractTransformpublic AffineTransform rotate(float angle)
Transformrotate in interface Transformrotate in class AbstractTransformpublic AffineTransform translate(float tx, float ty)
Transformtranslate in interface Transformtranslate in class AbstractTransformpublic AffineTransform translateX(float tx)
TransformtranslateX in interface TransformtranslateX in class AbstractTransformpublic AffineTransform translateY(float ty)
TransformtranslateY in interface TransformtranslateY in class AbstractTransformpublic AffineTransform shear(float sx, float sy)
Transformshear in interface Transformshear in class AbstractTransformpublic AffineTransform shearX(float sx)
TransformshearX in interface TransformshearX in class AbstractTransformpublic AffineTransform shearY(float sy)
TransformshearY in interface TransformshearY in class AbstractTransformpublic AffineTransform invert()
Transformpublic Transform concatenate(Transform other)
Transformother to this transform
(i.e. this x other).public Transform preConcatenate(Transform other)
Transformother
(i.e. other x this).public Transform lerp(Transform other, float t)
Transformpublic Point transform(IPoint p, Point into)
Transforminto.into - a point into which to store the result, may be the same object as p.into for chaining.public void transform(IPoint[] src, int srcOff, Point[] dst, int dstOff, int count)
Transformsrc - 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.public void transform(float[] src,
int srcOff,
float[] dst,
int dstOff,
int count)
Transformsrc - 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.public Point inverseTransform(IPoint p, Point into)
Transforminto.into - a point into which to store the result, may be the same object as p.into, for chaining.public Vector transformPoint(IVector v, Vector into)
Transforminto.into - a vector into which to store the result, may be the same object as v.into, for chaining.public Vector transform(IVector v, Vector into)
Transforminto.into - a vector into which to store the result, may be the same object as v.into, for chaining.public Vector inverseTransform(IVector v, Vector into)
Transforminto.into - a vector into which to store the result, may be the same object as v.into, for chaining.public AffineTransform copy()
Transformcopy in interface Transformcopy in class AbstractTransformpublic int generality()
TransformCopyright © 2017. All rights reserved.