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
ImageLabelImageButtonLast updated