Synced
GamePresentationSettings.CalculateViewport
Section titled “GamePresentationSettings.CalculateViewport”
- Calculates the centered content region for an available presentation surface.
Required contracts
Section titled “Required contracts”API: engine
Project: Inno.Runtime
Declaration
Section titled “Declaration”public Inno.Runtime.GamePresentationViewport Inno.Runtime.GamePresentationSettings.CalculateViewport(int availableWidth, int availableHeight)Parameters
Section titled “Parameters”Parameter availableWidth: Positive available surface width in pixels or logical preview units.
Parameter availableHeight: Positive available surface height in pixels or logical preview units.
Returns
Section titled “Returns”A positive region that fills the surface or fits the configured reference aspect ratio.
Exceptions
Section titled “Exceptions”Exception T:System.ArgumentOutOfRangeException: Thrown when an available or reference dimension is not positive.