-
Notifications
You must be signed in to change notification settings - Fork 0
TextureRect StretchModeEnum
Home | API by Category | Complete API Index | API Compatibility
| Field | Value |
|---|---|
| Full name | Electron2D.TextureRect.StretchModeEnum |
| Namespace | Electron2D |
| Kind | enum |
| Category | UI and Text |
Identifies how a texture is drawn inside the control rectangle.
public enum Electron2D.TextureRect.StretchModeEnum : System.IComparable, System.IConvertible, System.IFormattable, System.ISpanFormattableProfile: Electron2D 0.1.0 2D
Status: Supported / Parity verified
Out of profile: no
Godot reference: TextureRect.StretchMode
Scale, tile, keep, centered and aspect-preserving draw modes for TextureRect.
Stretch mode affects draw command destination rectangles. Tiling modes use a single texture draw command in the preview renderer path.
This enum is immutable and is safe to use from any thread.
This enum is available since Electron2D 0.1.0 Preview.
Electron2D.TextureRect.StretchMode
| Member | Kind | Summary |
|---|---|---|
Keep |
Enum value | Keeps the original texture size at the top-left corner. |
KeepAspect |
Enum value | Fits the texture inside the control while preserving aspect ratio. |
KeepAspectCentered |
Enum value | Fits the texture inside the control and centers it. |
KeepAspectCovered |
Enum value | Covers the control while preserving aspect ratio. |
KeepCentered |
Enum value | Keeps the original texture size and centers it. |
Scale |
Enum value | Scales the texture to the control rectangle. |
Tile |
Enum value | Draws the texture over the control rectangle. |
Kind: Enum value
public const Electron2D.TextureRect.StretchModeEnum KeepKeeps the original texture size at the top-left corner.
Use this value to avoid scaling.
This value is available since Electron2D 0.1.0 Preview.
Electron2D.TextureRect.StretchModeEnum
Kind: Enum value
public const Electron2D.TextureRect.StretchModeEnum KeepAspectFits the texture inside the control while preserving aspect ratio.
Use this value when the full texture should remain visible.
This value is available since Electron2D 0.1.0 Preview.
Electron2D.TextureRect.StretchModeEnum
Kind: Enum value
public const Electron2D.TextureRect.StretchModeEnum KeepAspectCenteredFits the texture inside the control and centers it.
Use this value for centered aspect-ratio drawing.
This value is available since Electron2D 0.1.0 Preview.
Electron2D.TextureRect.StretchModeEnum
Kind: Enum value
public const Electron2D.TextureRect.StretchModeEnum KeepAspectCoveredCovers the control while preserving aspect ratio.
The destination rectangle can extend outside the control area.
This value is available since Electron2D 0.1.0 Preview.
Electron2D.TextureRect.StretchModeEnum
Kind: Enum value
public const Electron2D.TextureRect.StretchModeEnum KeepCenteredKeeps the original texture size and centers it.
Use this value for fixed-size centered images.
This value is available since Electron2D 0.1.0 Preview.
Electron2D.TextureRect.StretchModeEnum
Kind: Enum value
public const Electron2D.TextureRect.StretchModeEnum ScaleScales the texture to the control rectangle.
Use this value with Electron2D.TextureRect.StretchMode.
This value is available since Electron2D 0.1.0 Preview.
Electron2D.TextureRect.StretchModeEnum
Kind: Enum value
public const Electron2D.TextureRect.StretchModeEnum TileDraws the texture over the control rectangle.
Use this value for texture-backed UI surfaces.
This value is available since Electron2D 0.1.0 Preview.
Electron2D.TextureRect.StretchModeEnum
Electron2D 0.1.0 Preview API reference. Generated from 175 public runtime types.