Source set: Android
public class RemoteDensity(public val density: RemoteFloat, public val fontScale: RemoteFloat)
Represents the screen density and font scale factor used for unit conversions in a remote composition context. Similar to Compose Density.
Functions
toPx
Source set: Android
public fun TextUnit.toPx(): RemoteFloat
Converts a TextUnit to pixels using this RemoteDensity.
toPx
Source set: Android
public fun Dp.toPx(): RemoteFloat
Converts a Dp to pixels using this RemoteDensity.
Members
Companion
Source set: Android
public companion object
Properties
Host
Source set: Android
public val Host: RemoteDensity
A RemoteDensity instance that represents the host's screen density, with font scale derived from the host's system font size and density settings.