MediaExtensions.

CalculateSize(Stretch, Size, Size, StretchDirection) Method

Summary

Calculates a scaled size based on a Stretch value.
Namespace
Avalonia.Media
Containing Type
MediaExtensions

Syntax

public static Size CalculateSize(this Stretch stretch, Size destinationSize, Size sourceSize, StretchDirection stretchDirection = Both)

Parameters

Name Type Description
stretch Stretch The stretch mode.
destinationSize Size The size of the destination viewport.
sourceSize Size The size of the source.
stretchDirection StretchDirection The stretch direction.

Return Value

Type Description
Size The size of the stretched source.