CropConstraint

sealed interface CropConstraint(source)

What a crop gesture is allowed to produce.

Immutable, so an overlay holding one as an option stays skippable.

Inheritors

Types

Link copied to clipboard
object Companion
Link copied to clipboard
class FixedAspect(val ratio: Float, val minWidth: Float) : CropConstraint

A rectangle whose width over height always equals ratio.

Link copied to clipboard
class Free(val minWidth: Float, val minHeight: Float) : CropConstraint

A rectangle of any size at or above minWidth and minHeight.

Functions

Link copied to clipboard
abstract fun constrain(proposed: NormalizedRect, handle: CropHandle): NormalizedRect

Corrects proposed into a rectangle this constraint allows.