PixelSize

data class PixelSize(val width: Int, val height: Int)(source)

Immutable pixel dimensions for Kotlin callers that do not need the recovered mutable API.

Throws

when either dimension is negative

Constructors

Link copied to clipboard
constructor(width: Int, height: Int)

Types

Link copied to clipboard
object Companion

Shared constants for PixelSize.

Properties

Link copied to clipboard
val height: Int

nonnegative vertical dimension in pixels

Link copied to clipboard

Returns true when either dimension is zero.

Link copied to clipboard
val width: Int

nonnegative horizontal dimension in pixels

Functions

Link copied to clipboard

Scales this size down to fit maximum without changing its aspect ratio.

Link copied to clipboard

Copies this immutable size into an Android framework size.