createCreationDisplayInfo
Source set: Android
@Composable
public fun createCreationDisplayInfo(
width: Int = LocalResources.current.displayMetrics.widthPixels,
height: Int = LocalResources.current.displayMetrics.heightPixels,
densityDpi: Int = LocalConfiguration.current.densityDpi,
fontScale: Float = LocalConfiguration.current.fontScale,
isInspectionMode: Boolean = LocalInspectionMode.current,
densityBehavior: RemoteDensityBehavior = RemoteDensityBehavior.Legacy,
): RemoteCreationDisplayInfo
Creates a RemoteCreationDisplayInfo instance from display metrics.
This function is used to capture the essential display properties required for remote rendering. By default, it uses the system's current display metrics.
Parameters
| width | The width of the display in pixels. Defaults to the system display width. |
| height | The height of the display in pixels. Defaults to the system display height. |
| densityDpi | The logical densityDpi of the display. Defaults to the system display density. |
| fontScale | The user preference for the scaling factor for fonts, relative to the base density scaling. |
| isInspectionMode | Whether the capture is happening in inspection mode (e.g. for a preview). |
| densityBehavior | The RemoteDensityBehavior to use. Defaults to RemoteDensityBehavior.Legacy. |
Returns
| A RemoteCreationDisplayInfo object containing the specified display metrics. |