Table of Contents

Enum MaterialAlignment

Namespace
RichHudFramework.UI.Rendering
Assembly
RichHudClient.dll

Defines how a Material texture is mapped to the geometry of the UI element.

public enum MaterialAlignment

Fields

StretchToFit = 0

Stretches or squeezes the material to fill the element's bounds exactly. This behaves like CSS "fill". Aspect ratio is ignored, which may result in distortion.

FitVertical = 1

Scales the material to match the height of the element. The width is adjusted to maintain aspect ratio. If the material is wider than the element, it will be cropped horizontally.

FitHorizontal = 2

Scales the material to match the width of the element. The height is adjusted to maintain aspect ratio. If the material is taller than the element, it will be cropped vertically.

FitAuto = 3

Scales the material to cover the entire element while maintaining aspect ratio. This behaves like CSS "contain". The texture is not cropped, but may leave empty space.