toDpSize

fun Dimension.toDpSize(): DpSize

Converts a Dimension to DpSize. If the receiver is a JBDimension instance, this function delegates to the specific toDpSize for it, which is scaling-aware.


fun JBDimension.toDpSize(): DpSize

Converts a JBDimension to DpSize, in a scaling-aware way. This means that the resulting DpSize will be constructed by first obtaining the unscaled values. This avoids double scaling.