Skip to content

Enum ImageFit

Definition

Namespace: StardewUI.Widgets
Assembly: StardewUI.dll

Specifies how an image should be scaled to fit the content area when the available size is different from the image size, and especially when it has a different aspect ratio.

public enum ImageFit

Inheritance
ObjectValueTypeEnum ⇦ ImageFit

Fields

Name Value Description
None 0 Don't scale the image, i.e. draw it at its original size regardless of the eventual layout size.
Contain 1 Force uniform scaling, and make both dimensions small enough to fit in the content area.
Cover 2 Force uniform scaling, and make both dimensions large enough to completely cover the content area (i.e. clip whatever parts are outside the bounds).
Stretch 3 Allow non-uniform scaling, and scale the image to exactly match the content area.