# Transform2d struct

Namespace: [Rhino.Geometry](https://developer.rhino3d.com/api/rhinocommon/namespace/rhino.geometry.md) · Assembly: [RhinoCommon](https://developer.rhino3d.com/api/rhinocommon/assembly/rhinocommon.md)

```cs
[StructLayout(LayoutKind.Sequential, Pack = 8, Size = 48)]
[Serializable]
public struct Transform2d : IComparable<Transform2d>, IEquatable<Transform2d>, ICloneable
```

Represents the values in a 2d affine transformation.

This is parallel to C++ ON_Xform2d.

## Constructors

- [Transform2d](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform2d/ctor.md): (3 overloads) Initializes a new transform matrix with a specified value along the diagonal.

## Properties

- [Determinant](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform2d/determinant.md): The determinant of the 2x2 linear part of this matrix. Because the bottom row is (0,0,1) this is also the signed area scale factor of the transformation. A negative determinant means the transformation reverses orientation.
- [Identity](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform2d/identity.md): (static) Gets a new identity transform matrix. An identity matrix defines no transformation.
- [IsIdentity](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform2d/isidentity.md): Return true if this Transform2d is the identity transform.
- [IsTranslation](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform2d/istranslation.md): True if this transform is a pure translation, that is the linear part is the 2x2 identity.
- [IsValid](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform2d/isvalid.md): Gets a value indicating whether or not this Transform2d is a valid matrix. A valid transform matrix is not allowed to have any invalid numbers.
- [IsZeroTransformation](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform2d/iszerotransformation.md): True if every value is 0. This transformation maps every point to (0,0).
- [M00](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform2d/m00.md): Gets or sets this[0,0].
- [M01](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform2d/m01.md): Gets or sets this[0,1].
- [M02](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform2d/m02.md): Gets or sets this[0,2], the X translation.
- [M10](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform2d/m10.md): Gets or sets this[1,0].
- [M11](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform2d/m11.md): Gets or sets this[1,1].
- [M12](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform2d/m12.md): Gets or sets this[1,2], the Y translation.
- [Nan](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform2d/nan.md): (static) Gets a transform matrix in which every value is not-a-number. The static constructors return this when they are given invalid input.
- [Unset](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform2d/unset.md): (static) Gets a transform matrix filled with RhinoMath.UnsetValue.
- [ZeroTransformation](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform2d/zerotransformation.md): (static) Gets a transform matrix in which every value is zero. This transformation maps every point to (0,0).

## Indexers

- [this[]](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform2d/item.md): Gets or sets the matrix value at the given row and column indices.

## Methods

- [Clone](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform2d/clone.md): Returns a deep copy of the transform. For languages that treat structures as value types, this can be accomplished by a simple assignment.
- [CompareTo](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform2d/compareto.md): Compares this transform with another transform. M00 has highest value, then M01, etc..
- [Equals](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform2d/equals.md): (2 overloads) Determines if another object is a Transform2d and its value equals this transform value.
- [FromAffineElements](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform2d/fromaffineelements.md): (3 overloads, static) Creates a transform from the six coefficients used by the traditional 2d drawing APIs. See the remarks on [Transform2d.ToAffineElements()](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform2d/toaffineelements.md).
- [GetAffineElements](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform2d/getaffineelements.md): Gets the six coefficients used by the traditional 2d drawing APIs. See the remarks on [Transform2d.ToAffineElements()](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform2d/toaffineelements.md).
- [GetHashCode](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform2d/gethashcode.md): Gets a non-unique hashing code for this transform.
- [Multiply](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform2d/multiply.md): (static) Multiplies (combines) two transformations. This is the same as the * operator between two transformations.
- [Rotation](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform2d/rotation.md): (4 overloads, static) Constructs a new rotation transformation with a specified rotation center.
- [Scale](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform2d/scale.md): (2 overloads, static) Constructs a new uniform scaling transformation with a specified anchor point.
- [ICloneable.Clone](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform2d/system-icloneable-clone.md)
- [ToAffineElements](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform2d/toaffineelements.md): Gets the six coefficients used by the traditional 2d drawing APIs as an array in (a, b, c, d, tx, ty) order.
- [ToString](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform2d/tostring.md): Returns a string representation of this transform.
- [ToTransform](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform2d/totransform.md): Gets the 4x4 transformation that applies this 2d transformation to the x and y coordinates and leaves the z coordinate unchanged.
- [Translation](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform2d/translation.md): (2 overloads, static) Constructs a new translation (move) transformation. Right column is (dx, dy).
- [TryGetInverse](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform2d/trygetinverse.md): Attempts to get the inverse transform of this transform.
- [TryGetTransform2d](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform2d/trygettransform2d.md): (2 overloads, static) Attempts to get the 2d transformation defined by the x and y rows and columns of a 4x4 transformation. This succeeds when transform is affine and maps the world xy plane to itself.

## Operators

- [operator ==](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform2d/op-equality.md): (static) Determines if two transformations are equal in value.
- [operator !=](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform2d/op-inequality.md): (static) Determines if two transformations are different in value.
- [operator *](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform2d/op-multiply.md): (3 overloads, static) Multiplies a transformation by a point and gets a new point.
