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 toPx(dp: RemoteDp): RemoteFloat
Converts a RemoteDp to pixels using this RemoteDensity.
toPx
Source set: Android
public fun toPx(textUnit: RemoteTextUnit): RemoteFloat
Converts a RemoteTextUnit 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.