Table of Contents

Enum Stretch

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

Specifies how a texture is scaled when drawn to a TextureCanvas.

public enum 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.