contains

fun contains(component: Component, x: Int, y: Int): Boolean

Whether (x, y), in component's coordinates, hits it: inside the layout bounds, as its placement layers rotate, scale and clip them, or, inside its bounds, where a visible child's own contains takes the point, as for a child placed or painting past the layout bounds. A step that cuts its children to its box, such as a clip or a fade, cuts the point too. Other paint outsets, such as a shadow's, are not hit.