calculateFromSize

fun calculateFromSize(width: Int, height: Int, supportedWidthSizeClasses: Set<WindowWidthSizeClass> = WindowWidthSizeClass.DefaultSizeClasses, supportedHeightSizeClasses: Set<WindowHeightSizeClass> = WindowHeightSizeClass.DefaultSizeClasses): WindowSizeClass(source)

Calculates the best matched WindowSizeClass for a given size according to the provided supportedWidthSizeClasses and supportedHeightSizeClasses.

Return

WindowSizeClass corresponding to the given width and height

Parameters

width

width of the window

height

height of the window

supportedWidthSizeClasses

the set of width size classes that are supported

supportedHeightSizeClasses

the set of height size classes that are supported