편집

다음을 통해 공유


CGAffineTransform Struct

Definition

2D Affine transformation used to convert between coordinate spaces.

public struct CGAffineTransform
type CGAffineTransform = struct
Inheritance
CGAffineTransform

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)

Initializes an affine transformation from the matrix values.

Fields

x0

X translation component of the affine transform.

xx

XX component of the affine.

xy

XY component of the affine.

y0

Y translation component of the affine transformation.

yx

YX component of the affine.

yy

YY component of the affine.

Properties

IsIdentity

Determines if the affine corresponds to the identity affine.

Methods

CGAffineTransformInvert(CGAffineTransform)

Inverts the affine transformation matrix.

CGRectApplyAffineTransform(CGRect, CGAffineTransform)
Equals(Object)

Compares the objects for equality.

GetHashCode()

The hashcode for this object.

Invert()

Inverts this affine transformation.

MakeIdentity()

Returns the identity affine transformation.

MakeRotation(nfloat)

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

MakeScale(nfloat, nfloat)

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

MakeTranslation(nfloat, nfloat)

Return the affine transformation for translating to the requested location.

Multiply(CGAffineTransform, CGAffineTransform)

Multiplies the two affine transformations and returns the result.

Multiply(CGAffineTransform)

Multiplies the current affine transformation by the specified affine transformation.

Rotate(CGAffineTransform, nfloat)

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

Rotate(nfloat, MatrixOrder)
Rotate(nfloat)

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

Scale(CGAffineTransform, nfloat, nfloat)

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

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

Modify the affine to scale by the specified magnitudes.

ToString()

Renders the affine in textual form.

TransformPoint(CGPoint)

Transforms the coordinates of the provided point by the affine.

TransformRect(CGRect)

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

TransformSize(CGSize)
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.

Translate(nfloat, nfloat, MatrixOrder)
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.

Operators

Equality(CGAffineTransform, CGAffineTransform)

Operator overload, compares two affines.

Inequality(CGAffineTransform, CGAffineTransform)

Compares affines for inequality.

Multiply(CGAffineTransform, CGAffineTransform)

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

Applies to