Skip to content

IntRect

@Serializable



data class IntRect(
    val minX: Int, 
    val minY: Int, 
    val maxX: Int, 
    val maxY: Int
)

An axis-aligned integer rectangle described by its min/max bounds along each axis, rather than an origin and a size. Used for hit-testing and clip/overlap calculations (e.g. scissor regions).

Constructors

IntRect

constructor(
    minX: Int, 
    minY: Int, 
    maxX: Int, 
    maxY: Int
)

Types

Companion

object Companion

Properties

height

val height: Int

maxX

val maxX: Int

maxY

val maxY: Int

minX

val minX: Int

minY

val minY: Int

width

val width: Int

Functions

div

operator fun div(other: IntRect): IntRect?

intersect

fun intersect(other: IntRect): IntRect?

Returns the overlapping region between this rect and other, or null if they don't overlap.

isEmpty

fun isEmpty(): Boolean

Returns true if this rect has zero or negative width/height.