NormalizedRect

class NormalizedRect(val left: Float, val top: Float, val right: Float, val bottom: Float)(source)

A rectangle in 0f..1f of the frame, origin top-left with +Y down, the convention Compose, SwiftUI and CSS use.

Crop coordinates address whatever geometry ran before them. Rotation runs before crop, so a rect is expressed in the rotated frame's space rather than the source frame's.

Constructors

Link copied to clipboard
constructor(left: Float, top: Float, right: Float, bottom: Float)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Bottom edge as a fraction of the frame height.

Link copied to clipboard

Height as a fraction of the frame.

Link copied to clipboard

True when the rect has positive area and lies inside the frame.

Link copied to clipboard
val left: Float

Left edge as a fraction of the frame width.

Link copied to clipboard

Right edge as a fraction of the frame width.

Link copied to clipboard
val top: Float

Top edge as a fraction of the frame height.

Link copied to clipboard

Width as a fraction of the frame.