---
title: "TransformOrigin"
description: "A two-dimensional position represented as a fraction of the Layer's width and height"
type: "class"
---

<div class='type'>Class</div>


<a id='references'></a>

<div class='sourceset sourceset-common'>Common</div>


```kotlin
value class TransformOrigin internal constructor(@PublishedApi internal val packedValue: Long)
```


A two-dimensional position represented as a fraction of the Layer's width and height


## Properties

<div class='sourceset sourceset-common'>Common</div>


```kotlin
val pivotFractionX: Float
```


Return the position along the x-axis that should be used as the origin for rotation and scale
transformations. This is represented as a fraction of the width of the content. A value of
0.5f represents the midpoint between the left and right bounds of the content



<div class='sourceset sourceset-common'>Common</div>


```kotlin
val pivotFractionY: Float
```


Return the position along the y-axis that should be used as the origin for rotation and scale
transformations. This is represented as a fraction of the height of the content. A value of
0.5f represents the midpoint between the top and bottom bounds of the content



## Functions

```kotlin
inline operator fun component1(): Float
```

```kotlin
inline operator fun component2(): Float
```

```kotlin
fun copy(
        pivotFractionX: Float = this.pivotFractionX,
        pivotFractionY: Float = this.pivotFractionY,
    ) = TransformOrigin(pivotFractionX, pivotFractionY)
```


Returns a copy of this TransformOrigin instance optionally overriding the pivotFractionX or
pivotFractionY parameter


## Companion Object

#### Properties

<div class='sourceset sourceset-common'>Common</div>


```kotlin
val Center = TransformOrigin(0.5f, 0.5f)
```


`TransformOrigin` constant to indicate that the center of the content should be used for
rotation and scale transformations





