Table of Contents

Enum TextureCanvas.Stretch

Namespace
Stride.CommunityToolkit.Rendering.Utilities
Assembly
Stride.CommunityToolkit.dll

Stretch modes when textures to a TextureCanvas

public enum TextureCanvas.Stretch

Fields

Contain = 2

The texture is resized to fit in the destination dimensions while it preserves its native aspect ratio.

Cover = 3

The texture is resized to fill the destination dimensions while it preserves its native aspect ratio. If the aspect ratio of the destination rectangle differs from the source, the source texture is clipped to fit in the destination dimensions.

None = 0

The texture preserves its original size. Overflowing content is cropped.

Stretch = 1

The texture is resized to fill the destination dimensions. The aspect ratio is not preserved.