FrameGeometry

Layout checks over Frames in one coordinate space.

Every check rejects unusable frames: empty, inverted, or nonfinite ones never match.

Functions

Link copied to clipboard
fun contains(child: Frame, container: Frame, tolerance: Float = 0.0f): Boolean

Returns whether child lies within container, grown by tolerance on every side.

Link copied to clipboard
fun horizontalGap(first: Frame, second: Frame): Float?

Returns the horizontal distance between two frames, or zero when they overlap horizontally.

Link copied to clipboard
fun horizontallyAligned(first: Frame, second: Frame, tolerance: Float = 1.0f): Boolean

Returns whether two frames' horizontal centers differ by less than tolerance.

Link copied to clipboard
fun isUsable(frame: Frame): Boolean

Returns whether frame has finite edges and a positive width and height that fit in a Float.

Link copied to clipboard
fun overlaps(first: Frame, second: Frame): Boolean

Returns whether two frames share a region of positive area; touching edges do not overlap.