getCenteredViewRect Function
Beta
Determine maximum ViewRect that can be fitted and centered in specified ViewRect given a required aspect ratio.
getCenteredViewRect(viewRect: ViewRect, aspectRatio: number = 1.4): ViewRect
Parameter | Type | Description |
---|---|---|
viewRect | ViewRect | view rectangle |
aspectRatio | number | width/height ratio |
Returns - A ViewRect centered in the input rectangle.
Defined in
Last Updated: 08 January, 2020