Bounds

data class Bounds(val x1: Int, val y1: Int, val x2: Int, val y2: Int)

Bounds represents the rectangular bounds of a UI element.

Constructors

Link copied to clipboard
constructor(x1: Int, y1: Int, x2: Int, y2: Int)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val height: Int
Link copied to clipboard
val width: Int
Link copied to clipboard
val x1: Int
Link copied to clipboard
val x2: Int
Link copied to clipboard
val y1: Int
Link copied to clipboard
val y2: Int

Functions

Link copied to clipboard

Check if this bounds fully contains another bounds.

Link copied to clipboard

Compute the percentage of the bounds that is visible on the screen.