Dp

value class Dp(val value: Float)

Density-independent pixel.

In PdfKmp 1.dp == 1 PDF point == 1/72 inch. This differs from Android Compose, where dp depends on screen density — PDF is a fixed-resolution medium, so we anchor dp to the native PDF unit. Page sizes, padding, and geometry are all expressed in Dp.

Constructors

Link copied to clipboard
constructor(value: Float)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Functions

Link copied to clipboard
operator fun compareTo(other: Dp): Int
Link copied to clipboard
operator fun div(scalar: Float): Dp
Link copied to clipboard
operator fun minus(other: Dp): Dp
Link copied to clipboard
operator fun plus(other: Dp): Dp
Link copied to clipboard
operator fun times(scalar: Float): Dp
operator fun times(scalar: Int): Dp
Link copied to clipboard
operator fun unaryMinus(): Dp