Mac Guides | Samples

MonoMac.CoreGraphics.CGAffineTransform Structure

2D Affine transformation used to convert between coordinate spaces.

See Also: CGAffineTransform


public struct CGAffineTransform


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.


Namespace: MonoMac.CoreGraphics
Assembly: XamMac (in XamMac.dll)
Assembly Versions:

The members of MonoMac.CoreGraphics.CGAffineTransform are listed below.

See Also: ValueType

Public Constructors

Initializes an affine transformation from the matrix values.

Public Fields

x0Single. X translation component of the affine transform.
xxSingle. XX component of the affine.
xySingle. XY component of the affine.
y0Single. Y translation component of the affine transformation.
yxSingle. YX component of the affine.
yySingle. YY component of the affine.

Public Properties

IsIdentityBoolean. Determines if the affine corresponds to the identity affine.

Public Methods

CGAffineTransformInvert(CGAffineTransform) : CGAffineTransform
Inverts the affine transformation matrix.
CGRectApplyAffineTransform(RectangleF, CGAffineTransform) : RectangleF
Applies an affine transformation to a rectangle.
Equals(Object) : Boolean
Compares the objects for equality.
GetHashCode() : Int32
The hashcode for this object.
Invert() : CGAffineTransform
Inverts this affine transformation.
MakeIdentity() : CGAffineTransform
Returns the identity affine transformation.
MakeRotation(Single) : CGAffineTransform
Returns an affine transformation for the requested rotation angle.
MakeScale(Single, Single) : CGAffineTransform
Returns the affine transformation for the requested scaling in the X and Y coordinates.
MakeTranslation(Single, Single) : CGAffineTransform
Return the affine transformation for translating to the requested location.
Multiplies the current affine transformation by the specified affine transformation.
Multiply(CGAffineTransform, CGAffineTransform) : CGAffineTransform
Multiplies the two affine transformations and returns the result.
Applies a rotation to the affine by the specified angle in radians.
Scale(Single, Single)
Modify the affine to scale by the specified magnitudes.
ToString() : String
Renders the affine in textual form.
TransformPoint(PointF) : PointF
Transforms the coordinates of the provided point by the affine.
TransformRect(RectangleF) : RectangleF
Applies the affine transform to the supplied rectangle and returns the transformed rectangle.
Translate(Single, Single)
Translates the affine transform by modifying every X value by the supplied X parameter and every Y value by the supplied Y parameter.

Public 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.