CGAffineTransform CGAffineTransform Struct

Definition

2D Affine transformation used to convert between coordinate spaces.

public struct CGAffineTransform
type CGAffineTransform = struct
Inheritance
CGAffineTransformCGAffineTransform

Remarks

An affine transformation uses a matrix to transform poitns between coordinate spaces.

These transformation can be used to rotate, scale, shear and translate points and rectangles from one coordinate system into another.

Constructors

CGAffineTransform(nfloat, nfloat, nfloat, nfloat, nfloat, nfloat) CGAffineTransform(nfloat, nfloat, nfloat, nfloat, nfloat, nfloat)

Initializes an affine transformation from the matrix values.

Fields

x0 x0

X translation component of the affine transform.

xx xx

XX component of the affine.

xy xy

XY component of the affine.

y0 y0

Y translation component of the affine transformation.

yx yx

YX component of the affine.

yy yy

YY component of the affine.

Properties

IsIdentity IsIdentity

Determines if the affine corresponds to the identity affine.

Methods

CGAffineTransformInvert(CGAffineTransform) CGAffineTransformInvert(CGAffineTransform)

Inverts the affine transformation matrix.

CGRectApplyAffineTransform(CGRect, CGAffineTransform) CGRectApplyAffineTransform(CGRect, CGAffineTransform)
Equals(Object) Equals(Object)

Compares the objects for equality.

GetHashCode() GetHashCode()

The hashcode for this object.

Invert() Invert()

Inverts this affine transformation.

MakeIdentity() MakeIdentity()

Returns the identity affine transformation.

MakeRotation(nfloat) MakeRotation(nfloat)

Returns an affine transformation for the requested rotation angle, in radians.

MakeScale(nfloat, nfloat) MakeScale(nfloat, nfloat)

Returns the affine transformation for the requested scaling in the X and Y coordinates.

MakeTranslation(nfloat, nfloat) MakeTranslation(nfloat, nfloat)

Return the affine transformation for translating to the requested location.

Multiply(CGAffineTransform) Multiply(CGAffineTransform)

Multiplies the current affine transformation by the specified affine transformation.

Multiply(CGAffineTransform, CGAffineTransform) Multiply(CGAffineTransform, CGAffineTransform)

Multiplies the two affine transformations and returns the result.

Rotate(nfloat, MatrixOrder) Rotate(nfloat, MatrixOrder)
Rotate(CGAffineTransform, nfloat) Rotate(CGAffineTransform, nfloat)

Applies a rotation to the affine by the specified angle, in radians.

Rotate(nfloat) Rotate(nfloat)

Applies a rotation to the affine by the specified angle, in radians.

Scale(nfloat, nfloat) Scale(nfloat, nfloat)

Modify the affine to scale by the specified magnitudes.

Scale(CGAffineTransform, nfloat, nfloat) Scale(CGAffineTransform, nfloat, nfloat)

Scales the affine by the specified magnitudes and returns the result.

Scale(nfloat, nfloat, MatrixOrder) Scale(nfloat, nfloat, MatrixOrder)
ToString() ToString()

Renders the affine in textual form.

TransformPoint(CGPoint) TransformPoint(CGPoint)

Transforms the coordinates of the provided point by the affine.

TransformRect(CGRect) TransformRect(CGRect)

Applies the affine transform to the supplied rectangle and returns the transformed rectangle.

TransformSize(CGSize) TransformSize(CGSize)
Translate(nfloat, nfloat, MatrixOrder) Translate(nfloat, nfloat, MatrixOrder)
Translate(nfloat, nfloat) Translate(nfloat, nfloat)

Translates the affine transform by modifying every X value by the supplied X parameter and every Y value by the supplied Y parameter.

Translate(CGAffineTransform, nfloat, nfloat) Translate(CGAffineTransform, nfloat, nfloat)

Translates the affine transform by modifying every X value by the supplied X parameter and every Y value by the supplied Y parameter.

Operators

Equality(CGAffineTransform, CGAffineTransform) Equality(CGAffineTransform, CGAffineTransform)

Operator overload, compares two affines.

Inequality(CGAffineTransform, CGAffineTransform) Inequality(CGAffineTransform, CGAffineTransform)

Compares affines for inequality.

Multiply(CGAffineTransform, CGAffineTransform) Multiply(CGAffineTransform, CGAffineTransform)

Multiplies the two affine transformations and returns a new affine with the result.

Applies to