Table of Contents

Class AffineTransform

Namespace
iText.Kernel.Geom
Assembly
itext.kernel.dll
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

m00 double
m10 double
m01 double
m11 double
m02 double
m12 double

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

t AffineTransform

Fields

TYPE_FLIP

The type of affine transformation.

public const int TYPE_FLIP = 64

Field Value

int

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

int

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

int

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

int

Remarks

The type of affine transformation. See GetTransformType().

TYPE_IDENTITY

The type of affine transformation.

public const int TYPE_IDENTITY = 0

Field Value

int

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

int

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

int

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

int

Remarks

The type of affine transformation. See GetTransformType().

TYPE_TRANSLATION

The type of affine transformation.

public const int TYPE_TRANSLATION = 1

Field Value

int

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

int

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

t AffineTransform

CreateInverse()

public virtual AffineTransform CreateInverse()

Returns

AffineTransform

DeltaTransform(double[], int, double[], int, int)

public virtual void DeltaTransform(double[] src, int srcOff, double[] dst, int dstOff, int length)

Parameters

src double[]
srcOff int
dst double[]
dstOff int
length int

DeltaTransform(Point, Point)

public virtual Point DeltaTransform(Point src, Point dst)

Parameters

src Point
dst Point

Returns

Point

Equals(object)

public override bool Equals(object o)

Parameters

o object

Returns

bool

GetDeterminant()

public virtual double GetDeterminant()

Returns

double

GetHashCode()

public override int GetHashCode()

Returns

int

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 double

angle 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 double

angle in radians to rotate over

x double

x-coordinate of center of rotation

y double

y-coordinate of center of rotation

Returns

AffineTransform

AffineTransform representing the rotation

GetScaleInstance(double, double)

public static AffineTransform GetScaleInstance(double scx, double scY)

Parameters

scx double
scY double

Returns

AffineTransform

GetScaleX()

public virtual double GetScaleX()

Returns

double

GetScaleY()

public virtual double GetScaleY()

Returns

double

GetShearInstance(double, double)

public static AffineTransform GetShearInstance(double shx, double shy)

Parameters

shx double
shy double

Returns

AffineTransform

GetShearX()

public virtual double GetShearX()

Returns

double

GetShearY()

public virtual double GetShearY()

Returns

double

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:

GetTranslateInstance(double, double)

public static AffineTransform GetTranslateInstance(double mx, double my)

Parameters

mx double
my double

Returns

AffineTransform

GetTranslateX()

public virtual double GetTranslateX()

Returns

double

GetTranslateY()

public virtual double GetTranslateY()

Returns

double

InverseTransform(double[], int, double[], int, int)

public virtual void InverseTransform(double[] src, int srcOff, double[] dst, int dstOff, int length)

Parameters

src double[]
srcOff int
dst double[]
dstOff int
length int

InverseTransform(float[], int, float[], int, int)

public virtual void InverseTransform(float[] src, int srcOff, float[] dst, int dstOff, int length)

Parameters

src float[]
srcOff int
dst float[]
dstOff int
length int

InverseTransform(Point, Point)

public virtual Point InverseTransform(Point src, Point dst)

Parameters

src Point
dst Point

Returns

Point

IsIdentity()

public virtual bool IsIdentity()

Returns

bool

PreConcatenate(AffineTransform)

public virtual void PreConcatenate(AffineTransform t)

Parameters

t AffineTransform

Rotate(double)

Add a counter-clockwise rotation to this transformation

public virtual void Rotate(double angle)

Parameters

angle double

angle 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 double

angle in radians to rotate over

px double

x-coordinate of center of rotation

py double

y-coordinate of center of rotation

Scale(double, double)

public virtual void Scale(double scx, double scy)

Parameters

scx double
scy double

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 double

angle 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 double

angle to rotate over in radians

px double

x-coordinate of center of rotation

py double

y-coordinate of center of rotation

SetToScale(double, double)

public virtual void SetToScale(double scx, double scy)

Parameters

scx double
scy double

SetToShear(double, double)

public virtual void SetToShear(double shx, double shy)

Parameters

shx double
shy double

SetToTranslation(double, double)

public virtual void SetToTranslation(double mx, double my)

Parameters

mx double
my double

SetTransform(double, double, double, double, double, double)

public virtual void SetTransform(double m00, double m10, double m01, double m11, double m02, double m12)

Parameters

m00 double
m10 double
m01 double
m11 double
m02 double
m12 double

SetTransform(float, float, float, float, float, float)

public virtual void SetTransform(float m00, float m10, float m01, float m11, float m02, float m12)

Parameters

m00 float
m10 float
m01 float
m11 float
m02 float
m12 float

SetTransform(AffineTransform)

public virtual void SetTransform(AffineTransform t)

Parameters

t AffineTransform

Shear(double, double)

public virtual void Shear(double shx, double shy)

Parameters

shx double
shy double

Transform(double[], int, double[], int, int)

public virtual void Transform(double[] src, int srcOff, double[] dst, int dstOff, int length)

Parameters

src double[]
srcOff int
dst double[]
dstOff int
length int

Transform(double[], int, float[], int, int)

public virtual void Transform(double[] src, int srcOff, float[] dst, int dstOff, int length)

Parameters

src double[]
srcOff int
dst float[]
dstOff int
length int

Transform(float[], int, double[], int, int)

public virtual void Transform(float[] src, int srcOff, double[] dst, int dstOff, int length)

Parameters

src float[]
srcOff int
dst double[]
dstOff int
length int

Transform(float[], int, float[], int, int)

public virtual void Transform(float[] src, int srcOff, float[] dst, int dstOff, int length)

Parameters

src float[]
srcOff int
dst float[]
dstOff int
length int

Transform(Point, Point)

public virtual Point Transform(Point src, Point dst)

Parameters

src Point
dst Point

Returns

Point

Transform(Point[], int, Point[], int, int)

public virtual void Transform(Point[] src, int srcOff, Point[] dst, int dstOff, int length)

Parameters

src Point[]
srcOff int
dst Point[]
dstOff int
length int

Translate(double, double)

public virtual void Translate(double mx, double my)

Parameters

mx double
my double