Class AffineTransform
public class AffineTransform
- Inheritance
-
AffineTransform
- Inherited Members
Constructors
AffineTransform()
public AffineTransform()
AffineTransform(double, double, double, double, double, double)
public AffineTransform(double m00, double m10, double m01, double m11, double m02, double m12)
Parameters
AffineTransform(double[])
public AffineTransform(double[] matrix)
Parameters
matrix
double[]
AffineTransform(float[])
public AffineTransform(float[] matrix)
Parameters
matrix
float[]
AffineTransform(AffineTransform)
public AffineTransform(AffineTransform t)
Parameters
Fields
TYPE_FLIP
The type of affine transformation.
public const int TYPE_FLIP = 64
Field Value
Remarks
The type of affine transformation. See GetTransformType().
TYPE_GENERAL_ROTATION
The type of affine transformation.
public const int TYPE_GENERAL_ROTATION = 16
Field Value
Remarks
The type of affine transformation. See GetTransformType().
TYPE_GENERAL_SCALE
The type of affine transformation.
public const int TYPE_GENERAL_SCALE = 4
Field Value
Remarks
The type of affine transformation. See GetTransformType().
TYPE_GENERAL_TRANSFORM
The type of affine transformation.
public const int TYPE_GENERAL_TRANSFORM = 32
Field Value
Remarks
The type of affine transformation. See GetTransformType().
TYPE_IDENTITY
The type of affine transformation.
public const int TYPE_IDENTITY = 0
Field Value
Remarks
The type of affine transformation. See GetTransformType().
TYPE_MASK_ROTATION
The type of affine transformation.
public const int TYPE_MASK_ROTATION = 24
Field Value
Remarks
The type of affine transformation. See GetTransformType().
TYPE_MASK_SCALE
The type of affine transformation.
public const int TYPE_MASK_SCALE = 6
Field Value
Remarks
The type of affine transformation. See GetTransformType().
TYPE_QUADRANT_ROTATION
The type of affine transformation.
public const int TYPE_QUADRANT_ROTATION = 8
Field Value
Remarks
The type of affine transformation. See GetTransformType().
TYPE_TRANSLATION
The type of affine transformation.
public const int TYPE_TRANSLATION = 1
Field Value
Remarks
The type of affine transformation. See GetTransformType().
TYPE_UNIFORM_SCALE
The type of affine transformation.
public const int TYPE_UNIFORM_SCALE = 2
Field Value
Remarks
The type of affine transformation. See GetTransformType().
Methods
Clone()
Creates a "deep copy" of this AffineTransform, meaning the object returned by this method will be independent of the object being cloned.
public virtual AffineTransform Clone()
Returns
- AffineTransform
the copied AffineTransform.
Concatenate(AffineTransform)
public virtual void Concatenate(AffineTransform t)
Parameters
CreateInverse()
public virtual AffineTransform CreateInverse()
Returns
DeltaTransform(double[], int, double[], int, int)
public virtual void DeltaTransform(double[] src, int srcOff, double[] dst, int dstOff, int length)
Parameters
DeltaTransform(Point, Point)
public virtual Point DeltaTransform(Point src, Point dst)
Parameters
Returns
Equals(object)
public override bool Equals(object o)
Parameters
o
object
Returns
GetDeterminant()
public virtual double GetDeterminant()
Returns
GetHashCode()
public override int GetHashCode()
Returns
GetMatrix(double[])
public virtual void GetMatrix(double[] matrix)
Parameters
matrix
double[]
GetMatrix(float[])
public virtual void GetMatrix(float[] matrix)
Parameters
matrix
float[]
GetRotateInstance(double)
Get an affine transformation representing a counter-clockwise rotation over the passed angle
public static AffineTransform GetRotateInstance(double angle)
Parameters
angle
doubleangle in radians to rotate over
Returns
- AffineTransform
AffineTransform representing the rotation
GetRotateInstance(double, double, double)
Get an affine transformation representing a counter-clockwise rotation over the passed angle, using the passed point as the center of rotation
public static AffineTransform GetRotateInstance(double angle, double x, double y)
Parameters
angle
doubleangle in radians to rotate over
x
doublex-coordinate of center of rotation
y
doubley-coordinate of center of rotation
Returns
- AffineTransform
AffineTransform representing the rotation
GetScaleInstance(double, double)
public static AffineTransform GetScaleInstance(double scx, double scY)
Parameters
Returns
GetScaleX()
public virtual double GetScaleX()
Returns
GetScaleY()
public virtual double GetScaleY()
Returns
GetShearInstance(double, double)
public static AffineTransform GetShearInstance(double shx, double shy)
Parameters
Returns
GetShearX()
public virtual double GetShearX()
Returns
GetShearY()
public virtual double GetShearY()
Returns
GetTransformType()
Method returns type of affine transformation.
public virtual int GetTransformType()
Returns
- int
the type of this AffineTransform
Remarks
Method returns type of affine transformation.
Transform matrix is m00 m01 m02 m10 m11 m12 According analytic geometry new basis vectors are (m00, m01) and (m10, m11), translation vector is (m02, m12). Original basis vectors are (1, 0) and (0, 1). Type transformations classification:- TYPE_IDENTITY - new basis equals original one and zero translation
- TYPE_TRANSLATION - translation vector isn't zero
- TYPE_UNIFORM_SCALE - vectors length of new basis equals
- TYPE_GENERAL_SCALE - vectors length of new basis doesn't equal
- TYPE_FLIP - new basis vector orientation differ from original one
- TYPE_QUADRANT_ROTATION - new basis is rotated by 90, 180, 270, or 360 degrees
- TYPE_GENERAL_ROTATION - new basis is rotated by arbitrary angle
- TYPE_GENERAL_TRANSFORM - transformation can't be inversed
GetTranslateInstance(double, double)
public static AffineTransform GetTranslateInstance(double mx, double my)
Parameters
Returns
GetTranslateX()
public virtual double GetTranslateX()
Returns
GetTranslateY()
public virtual double GetTranslateY()
Returns
InverseTransform(double[], int, double[], int, int)
public virtual void InverseTransform(double[] src, int srcOff, double[] dst, int dstOff, int length)
Parameters
InverseTransform(float[], int, float[], int, int)
public virtual void InverseTransform(float[] src, int srcOff, float[] dst, int dstOff, int length)
Parameters
InverseTransform(Point, Point)
public virtual Point InverseTransform(Point src, Point dst)
Parameters
Returns
IsIdentity()
public virtual bool IsIdentity()
Returns
PreConcatenate(AffineTransform)
public virtual void PreConcatenate(AffineTransform t)
Parameters
Rotate(double)
Add a counter-clockwise rotation to this transformation
public virtual void Rotate(double angle)
Parameters
angle
doubleangle in radians to rotate over
Rotate(double, double, double)
Add a counter-clockwise rotation to this transformation, using the passed point as the center of rotation
public virtual void Rotate(double angle, double px, double py)
Parameters
angle
doubleangle in radians to rotate over
px
doublex-coordinate of center of rotation
py
doubley-coordinate of center of rotation
Scale(double, double)
public virtual void Scale(double scx, double scy)
Parameters
SetToIdentity()
public virtual void SetToIdentity()
SetToRotation(double)
Set this affine transformation to represent a rotation over the passed angle
public virtual void SetToRotation(double angle)
Parameters
angle
doubleangle to rotate over in radians
SetToRotation(double, double, double)
Set this affine transformation to represent a rotation over the passed angle, using the passed point as the center of rotation
public virtual void SetToRotation(double angle, double px, double py)
Parameters
angle
doubleangle to rotate over in radians
px
doublex-coordinate of center of rotation
py
doubley-coordinate of center of rotation
SetToScale(double, double)
public virtual void SetToScale(double scx, double scy)
Parameters
SetToShear(double, double)
public virtual void SetToShear(double shx, double shy)
Parameters
SetToTranslation(double, double)
public virtual void SetToTranslation(double mx, double my)
Parameters
SetTransform(double, double, double, double, double, double)
public virtual void SetTransform(double m00, double m10, double m01, double m11, double m02, double m12)
Parameters
SetTransform(float, float, float, float, float, float)
public virtual void SetTransform(float m00, float m10, float m01, float m11, float m02, float m12)
Parameters
SetTransform(AffineTransform)
public virtual void SetTransform(AffineTransform t)
Parameters
Shear(double, double)
public virtual void Shear(double shx, double shy)
Parameters
Transform(double[], int, double[], int, int)
public virtual void Transform(double[] src, int srcOff, double[] dst, int dstOff, int length)
Parameters
Transform(double[], int, float[], int, int)
public virtual void Transform(double[] src, int srcOff, float[] dst, int dstOff, int length)
Parameters
Transform(float[], int, double[], int, int)
public virtual void Transform(float[] src, int srcOff, double[] dst, int dstOff, int length)
Parameters
Transform(float[], int, float[], int, int)
public virtual void Transform(float[] src, int srcOff, float[] dst, int dstOff, int length)
Parameters
Transform(Point, Point)
public virtual Point Transform(Point src, Point dst)
Parameters
Returns
Transform(Point[], int, Point[], int, int)
public virtual void Transform(Point[] src, int srcOff, Point[] dst, int dstOff, int length)
Parameters
Translate(double, double)
public virtual void Translate(double mx, double my)