MediaExtensionsCalculateSize Method
Calculates a scaled size based on a
Stretch value.
Namespace: Avalonia.MediaAssembly: Avalonia.Base (in Avalonia.Base.dll) Version: 11.3.999
public static Size CalculateSize(
this Stretch stretch,
Size destinationSize,
Size sourceSize,
StretchDirection stretchDirection = StretchDirection.Both
)
<ExtensionAttribute>
Public Shared Function CalculateSize (
stretch As Stretch,
destinationSize As Size,
sourceSize As Size,
Optional stretchDirection As StretchDirection = StretchDirection.Both
) As Size
[<ExtensionAttribute>]
static member CalculateSize :
stretch : Stretch *
destinationSize : Size *
sourceSize : Size *
?stretchDirection : StretchDirection
(* Defaults:
let _stretchDirection = defaultArg stretchDirection StretchDirection.Both
*)
-> Size
- stretch Stretch
- The stretch mode.
- destinationSize Size
- The size of the destination viewport.
- sourceSize Size
- The size of the source.
- stretchDirection StretchDirection (Optional)
- The stretch direction.
SizeThe size of the stretched source.In Visual Basic and C#, you can call this method as an instance method on any object of type
Stretch. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).