Open Asterune
UIAspectRatioConstraint

UIAspectRatioConstraint

Constrains an interface element's width-to-height ratio.

Creatable
Instance.new("UIAspectRatioConstraint")
Inherits
UIConstraintUIComponentUIBaseInstance
Replication
Standard

Behavior

UIAspectRatioConstraint constrains an interface element's width-to-height ratio.

Summary

Members4
Properties3
Methods1

Properties

AspectRatio

UIAspectRatioConstraint.AspectRatio: number = 1

The required width divided by height.

AspectType

UIAspectRatioConstraint.AspectType: Enum.AspectType = Enum.AspectType.FitWithinMaxSize

How the constraint determines the available size for the aspect ratio.

DominantAxis

UIAspectRatioConstraint.DominantAxis: Enum.DominantAxis = Enum.DominantAxis.Height

The dimension used to derive the other dimension under the aspect-ratio constraint.

Methods

GetExecutionGroup

UIAspectRatioConstraint:GetExecutionGroup(): ExecutionGroup?

Returns this instance if it is an ExecutionGroup. Otherwise returns the nearest ancestor ExecutionGroup, or nil when no group contains the instance.

Inherited members

Inherited47

UIConstraint