StretchMode
AspectRatioContainer.swift:19enum StretchModeenum StretchModeimport SwiftGodotFramework to write Godot Game Extensions using the Swift Programming Language.
class AspectRatioContainerA container that preserves the proportions of its child controls.
case widthControlsHeightThe height of child controls is automatically adjusted based on the width of the container.
case heightControlsWidthThe width of child controls is automatically adjusted based on the height of the container.
case fitThe bounding rectangle of child controls is automatically adjusted to fit inside the container while keeping the aspect ratio.
case coverThe width and height of child controls is automatically adjusted to make their bounding rectangle cover the entire area of the container while keeping the aspect ratio.
override class var godotClassName: StringName { get }final var alignmentHorizontal: AspectRatioContainer.AlignmentMode { get set }Specifies the horizontal relative position of child controls.
final var alignmentVertical: AspectRatioContainer.AlignmentMode { get set }Specifies the vertical relative position of child controls.
final var ratio: Double { get set }The aspect ratio to enforce on child controls. This is the width divided by the height. The ratio depends on the stretchMode.
final var stretchMode: AspectRatioContainer.StretchMode { get set }The stretch mode used to align child controls.
enum AlignmentModeprotocol CaseIterableA type that provides a collection of all of its values.
protocol CustomDebugStringConvertibleA type with a customized textual representation suitable for debugging purposes.
protocol EquatableA type that can be compared for value equality.
protocol Hashable : EquatableA type that can be hashed into a Hasher to produce an integer hash value.
protocol RawRepresentable<RawValue>A type that can be converted to and from an associated raw value.
init?(rawValue: Int64) var debugDescription: String { get }A textual representation of this instance, suitable for debugging
var hashValue: Int { get }static func != (lhs: Self, rhs: Self) -> Bool Returns a Boolean value indicating whether two values are not equal.
func hash(into hasher: inout Hasher)