public class Translate2D extends BaseTransform
BaseTransform.Degree| Modifier and Type | Field and Description |
|---|---|
private static long |
BASE_HASH |
private double |
mxt |
private double |
myt |
EPSILON_ABSOLUTE, IDENTITY_TRANSFORM, TYPE_AFFINE_3D, TYPE_AFFINE2D_MASK, TYPE_FLIP, TYPE_GENERAL_ROTATION, TYPE_GENERAL_SCALE, TYPE_GENERAL_TRANSFORM, TYPE_IDENTITY, TYPE_MASK_ROTATION, TYPE_MASK_SCALE, TYPE_QUADRANT_ROTATION, TYPE_TRANSLATION, TYPE_UNIFORM_SCALE, TYPE_UNKNOWN| Constructor and Description |
|---|
Translate2D(BaseTransform tx) |
Translate2D(double tx,
double ty) |
| Modifier and Type | Method and Description |
|---|---|
private static double |
_matround(double matval) |
BaseTransform |
copy() |
BaseTransform |
createInverse()
This function always returns a new object, unless the transform
is an identity transform in which case it might return the
Identity singleton. |
Shape |
createTransformedShape(Shape s) |
void |
deltaTransform(double[] srcPts,
int srcOff,
double[] dstPts,
int dstOff,
int numPts) |
void |
deltaTransform(float[] srcPts,
int srcOff,
float[] dstPts,
int dstOff,
int numPts) |
Vec3d |
deltaTransform(Vec3d src,
Vec3d dst) |
BaseTransform |
deriveWithConcatenation(BaseTransform tx) |
BaseTransform |
deriveWithConcatenation(double mxx,
double myx,
double mxy,
double myy,
double mxt,
double myt) |
BaseTransform |
deriveWithConcatenation(double mxx,
double mxy,
double mxz,
double mxt,
double myx,
double myy,
double myz,
double myt,
double mzx,
double mzy,
double mzz,
double mzt) |
BaseTransform |
deriveWithNewTransform(BaseTransform tx) |
BaseTransform |
deriveWithPreConcatenation(BaseTransform tx) |
BaseTransform |
deriveWithPreTranslation(double mxt,
double myt) |
BaseTransform |
deriveWithRotation(double theta,
double axisX,
double axisY,
double axisZ) |
BaseTransform |
deriveWithScale(double mxx,
double myy,
double mzz) |
BaseTransform |
deriveWithTranslation(double mxt,
double myt) |
BaseTransform |
deriveWithTranslation(double mxt,
double myt,
double mzt) |
boolean |
equals(java.lang.Object obj)
Returns
true if this BaseTransform
represents the same coordinate transform as the specified
argument. |
BaseTransform.Degree |
getDegree() |
double |
getDeterminant() |
static BaseTransform |
getInstance(double mxt,
double myt) |
double |
getMxt() |
double |
getMyt() |
int |
getType()
Retrieves the flag bits describing the conversion properties of
this transform.
|
int |
hashCode()
Returns the hashcode for this transform.
|
void |
inverseDeltaTransform(float[] srcPts,
int srcOff,
float[] dstPts,
int dstOff,
int numPts) |
Vec3d |
inverseDeltaTransform(Vec3d src,
Vec3d dst) |
BaseBounds |
inverseTransform(BaseBounds bounds,
BaseBounds result) |
void |
inverseTransform(double[] srcPts,
int srcOff,
double[] dstPts,
int dstOff,
int numPts) |
void |
inverseTransform(float[] srcPts,
int srcOff,
float[] dstPts,
int dstOff,
int numPts) |
Point2D |
inverseTransform(Point2D src,
Point2D dst) |
void |
inverseTransform(Rectangle rect,
Rectangle result) |
Vec3d |
inverseTransform(Vec3d src,
Vec3d dst) |
void |
invert()
This function inverts the
BaseTransform in place. |
boolean |
is2D() |
boolean |
isIdentity() |
boolean |
isTranslateOrIdentity() |
void |
restoreTransform(double mxx,
double myx,
double mxy,
double myy,
double mxt,
double myt)
This function is only guaranteed to succeed if the transform is
of degree AFFINE2D or less and the matrix
parameters specified came from this same instance.
|
void |
restoreTransform(double mxx,
double mxy,
double mxz,
double mxt,
double myx,
double myy,
double myz,
double myt,
double mzx,
double mzy,
double mzz,
double mzt)
This function is only guaranteed to succeed if the matrix
parameters specified came from this same instance.
|
void |
setToIdentity() |
void |
setTransform(BaseTransform xform) |
java.lang.String |
toString()
Returns the matrix elements and degree of this transform as a string.
|
BaseBounds |
transform(BaseBounds bounds,
BaseBounds result) |
void |
transform(double[] srcPts,
int srcOff,
double[] dstPts,
int dstOff,
int numPts) |
void |
transform(double[] srcPts,
int srcOff,
float[] dstPts,
int dstOff,
int numPts) |
void |
transform(float[] srcPts,
int srcOff,
double[] dstPts,
int dstOff,
int numPts) |
void |
transform(float[] srcPts,
int srcOff,
float[] dstPts,
int dstOff,
int numPts) |
Point2D |
transform(Point2D src,
Point2D dst) |
void |
transform(Rectangle rect,
Rectangle result) |
(package private) static void |
transform(Rectangle rect,
Rectangle result,
double mxt,
double myt) |
Vec3d |
transform(Vec3d src,
Vec3d dst) |
almostZero, degreeError, getInstance, getInstance, getInstance, getMxx, getMxy, getMxz, getMyx, getMyy, getMyz, getMzt, getMzx, getMzy, getMzz, getRotateInstance, getScaleInstance, getTranslateInstance, makePointprivate double mxt
private double myt
private static final long BASE_HASH
public Translate2D(double tx,
double ty)
public Translate2D(BaseTransform tx)
public static BaseTransform getInstance(double mxt, double myt)
public BaseTransform.Degree getDegree()
getDegree in class BaseTransformpublic double getDeterminant()
getDeterminant in class BaseTransformpublic double getMxt()
getMxt in class BaseTransformpublic double getMyt()
getMyt in class BaseTransformpublic int getType()
BaseTransformgetType in class BaseTransformBaseTransform.TYPE_IDENTITY,
BaseTransform.TYPE_TRANSLATION,
BaseTransform.TYPE_UNIFORM_SCALE,
BaseTransform.TYPE_GENERAL_SCALE,
BaseTransform.TYPE_QUADRANT_ROTATION,
BaseTransform.TYPE_GENERAL_ROTATION,
BaseTransform.TYPE_GENERAL_TRANSFORMpublic boolean isIdentity()
isIdentity in class BaseTransformpublic boolean isTranslateOrIdentity()
isTranslateOrIdentity in class BaseTransformpublic boolean is2D()
is2D in class BaseTransformpublic Point2D transform(Point2D src, Point2D dst)
transform in class BaseTransformpublic Point2D inverseTransform(Point2D src, Point2D dst)
inverseTransform in class BaseTransformpublic Vec3d transform(Vec3d src, Vec3d dst)
transform in interface CanTransformVec3dtransform in class BaseTransformpublic Vec3d deltaTransform(Vec3d src, Vec3d dst)
deltaTransform in class BaseTransformpublic Vec3d inverseTransform(Vec3d src, Vec3d dst)
inverseTransform in class BaseTransformpublic Vec3d inverseDeltaTransform(Vec3d src, Vec3d dst)
inverseDeltaTransform in class BaseTransformpublic void transform(float[] srcPts,
int srcOff,
float[] dstPts,
int dstOff,
int numPts)
transform in class BaseTransformpublic void transform(double[] srcPts,
int srcOff,
double[] dstPts,
int dstOff,
int numPts)
transform in class BaseTransformpublic void transform(float[] srcPts,
int srcOff,
double[] dstPts,
int dstOff,
int numPts)
transform in class BaseTransformpublic void transform(double[] srcPts,
int srcOff,
float[] dstPts,
int dstOff,
int numPts)
transform in class BaseTransformpublic void deltaTransform(float[] srcPts,
int srcOff,
float[] dstPts,
int dstOff,
int numPts)
deltaTransform in class BaseTransformpublic void deltaTransform(double[] srcPts,
int srcOff,
double[] dstPts,
int dstOff,
int numPts)
deltaTransform in class BaseTransformpublic void inverseTransform(float[] srcPts,
int srcOff,
float[] dstPts,
int dstOff,
int numPts)
inverseTransform in class BaseTransformpublic void inverseDeltaTransform(float[] srcPts,
int srcOff,
float[] dstPts,
int dstOff,
int numPts)
inverseDeltaTransform in class BaseTransformpublic void inverseTransform(double[] srcPts,
int srcOff,
double[] dstPts,
int dstOff,
int numPts)
inverseTransform in class BaseTransformpublic BaseBounds transform(BaseBounds bounds, BaseBounds result)
transform in class BaseTransformpublic void transform(Rectangle rect, Rectangle result)
transform in class BaseTransformpublic BaseBounds inverseTransform(BaseBounds bounds, BaseBounds result)
inverseTransform in class BaseTransformpublic void inverseTransform(Rectangle rect, Rectangle result)
inverseTransform in class BaseTransformpublic Shape createTransformedShape(Shape s)
createTransformedShape in class BaseTransformpublic void setToIdentity()
setToIdentity in class BaseTransformpublic void setTransform(BaseTransform xform)
setTransform in class BaseTransformpublic void invert()
BaseTransformBaseTransform in place. All
current implementations can support their own inverted form, and
that should likely remain true in the future as well.invert in class BaseTransformpublic void restoreTransform(double mxx,
double myx,
double mxy,
double myy,
double mxt,
double myt)
BaseTransformrestoreTransform in class BaseTransformpublic void restoreTransform(double mxx,
double mxy,
double mxz,
double mxt,
double myx,
double myy,
double myz,
double myt,
double mzx,
double mzy,
double mzz,
double mzt)
BaseTransformrestoreTransform in class BaseTransformpublic BaseTransform deriveWithTranslation(double mxt, double myt)
deriveWithTranslation in class BaseTransformpublic BaseTransform deriveWithTranslation(double mxt, double myt, double mzt)
deriveWithTranslation in class BaseTransformpublic BaseTransform deriveWithScale(double mxx, double myy, double mzz)
deriveWithScale in class BaseTransformpublic BaseTransform deriveWithRotation(double theta, double axisX, double axisY, double axisZ)
deriveWithRotation in class BaseTransformpublic BaseTransform deriveWithPreTranslation(double mxt, double myt)
deriveWithPreTranslation in class BaseTransformpublic BaseTransform deriveWithConcatenation(double mxx, double myx, double mxy, double myy, double mxt, double myt)
deriveWithConcatenation in class BaseTransformpublic BaseTransform deriveWithConcatenation(double mxx, double mxy, double mxz, double mxt, double myx, double myy, double myz, double myt, double mzx, double mzy, double mzz, double mzt)
deriveWithConcatenation in class BaseTransformpublic BaseTransform deriveWithConcatenation(BaseTransform tx)
deriveWithConcatenation in class BaseTransformpublic BaseTransform deriveWithPreConcatenation(BaseTransform tx)
deriveWithPreConcatenation in class BaseTransformpublic BaseTransform deriveWithNewTransform(BaseTransform tx)
deriveWithNewTransform in class BaseTransformpublic BaseTransform createInverse()
BaseTransformIdentity singleton.createInverse in class BaseTransformprivate static double _matround(double matval)
public java.lang.String toString()
BaseTransformtoString in class BaseTransformpublic BaseTransform copy()
copy in class BaseTransformpublic boolean equals(java.lang.Object obj)
BaseTransformtrue if this BaseTransform
represents the same coordinate transform as the specified
argument.equals in class BaseTransformobj - the Object to test for equality with this
BaseTransformtrue if obj equals this
BaseTransform object; false otherwise.public int hashCode()
BaseTransformhashCode in class BaseTransform