---
title: "ContentScale"
description: "Represents a rule to apply to scale a source rectangle to be inscribed into a destination"
type: "interface"
---

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


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

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



```kotlin
interface ContentScale
```


Represents a rule to apply to scale a source rectangle to be inscribed into a destination


## Functions

```kotlin
fun computeScaleFactor(srcSize: Size, dstSize: Size): ScaleFactor
```


Computes the scale factor to apply to the horizontal and vertical axes independently of one
another to fit the source appropriately with the given destination



