> For the complete documentation index, see [llms.txt](https://docs.overdare.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.overdare.com/development/api-reference/enums/scaletype.md).

# ScaleType

## Overview

ScaleType is an Enum that defines how an image is scaled to fit the size of a UI element.

This is used in the ScaleType property of ImageLabel and ImageButton, and determines whether the image is stretched, divided into nine regions, repeated, or scaled while keeping its aspect ratio.

## Items

| Name    | Value | Description                                                                                                               |
| ------- | ----- | ------------------------------------------------------------------------------------------------------------------------- |
| Stretch | 0     | Stretches the image to fit the element.                                                                                   |
| Slice   | 1     | Divides the image into nine regions and applies a different scaling rule to each region.                                  |
| Tile    | 2     | Repeats the image in tiles of the TileSize size.                                                                          |
| Fit     | 3     | Scales the image to fit entirely inside the element while keeping its original aspect ratio.                              |
| Crop    | 4     | Scales the image to fill the element while keeping its original aspect ratio, and cuts off the parts outside the element. |

## See also

{% content-ref url="/pages/eHrtmMKd8kWc51tijR5V" %}
[ImageLabel](/development/api-reference/classes/imagelabel.md)
{% endcontent-ref %}

{% content-ref url="/pages/icUeAgDbD5Ij8LArLj7n" %}
[ImageButton](/development/api-reference/classes/imagebutton.md)
{% endcontent-ref %}
