fit_size


Description:

public void fit_size (Rectangle available, ref Rectangle output)

Calculates a suitable output rectangle that can fit inside the available space while maintaining the aspect ratio of the current video.

Applications would typically use this api for "letterboxing" by using this api to position a video inside a fixed screen space and filling the remaining space with black borders.

Parameters:

this

A VideoSink

available

The space available for video output

output

The return location for the calculated output position