# TransformOrigin

> Represents the point of origin where the transformations ( Scale, Translate, and Rotate ) are applied.

## Definition

* **Type:** Struct
* **Namespace:** [UnityEngine.UIElements](/engine/6000.7/script-reference/unityengine/uielements.md)
* **Assembly:** UnityEngine.UIElementsModule
* **Implements:** [IEquatable\<TransformOrigin>](https://learn.microsoft.com/dotnet/api/system.iequatable-1)

```csharp
public struct TransformOrigin : IEquatable<TransformOrigin>
```

## Remarks

By default, transform-origin is set in percentages relative to the element's size. For example, 50% 50% sets the origin to the center of the element. These percentages are calculated based on the element’s resulting layout size (resolvedStyle.height and resolvedStyle.width). You can also specify transform-origin in pixels. The origin is determined based on the local coordinate system of the element, where the top-left corner is considered the origin point (0,0) regardless of whether you use percentages or pixels. Negative values and values larger than 100% are valid and move the transform-origin outside the element.

## Constructors

| Constructor                                                                                                                                                    | Description                                                          |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- |
| [TransformOrigin(UnityEngine.UIElements.Length,UnityEngine.UIElements.Length)](/engine/6000.7/script-reference/unityengine/uielements/transformorigin/ctor.md) | Create a TransformOrigin data with two Lengths for the x and y axis. |

## Static Methods

| Method                                                                                       | Description                                                 |
| -------------------------------------------------------------------------------------------- | ----------------------------------------------------------- |
| [Initial](/engine/6000.7/script-reference/unityengine/uielements/transformorigin/initial.md) | Returns the initial value for the TransformOrigin property. |
