Open Asterune
ScaleType

ScaleType

How an interface image fits or repeats within its bounds.

Access items through Enum.ScaleType.

Behavior

How an interface image fits or repeats within its bounds.

Used by ImageButton.ScaleType, ImageLabel.ScaleType.

Items

Items5Value
  • Stretches the image to the element bounds.

  • Uses the configured nine-slice region.

  • Repeats the image at the configured tile size.

  • Preserves aspect ratio while fitting the image inside the bounds.

  • Preserves aspect ratio while filling the bounds and cropping excess image area.

Stretch

Stretches the image to the element bounds.

Slice

Uses the configured nine-slice region.

Tile

Repeats the image at the configured tile size.

Fit

Preserves aspect ratio while fitting the image inside the bounds.

Crop

Preserves aspect ratio while filling the bounds and cropping excess image area.