CENTER

CENTER(withinFn, { other, target -> other.center.withRelativeY(-target.height / 2) .withRelativeX(-target.width / 2) }, aroundFn, { _, _ -> throw UnsupportedOperationException("Can't use CENTER alignment around a container.") })

Functions

alignAround
Link copied to clipboard
common
fun alignAround(other: Rect, target: Size): Position
Returns the Position which can be used to properly align a boundable with target size aroundother.
alignWithin
Link copied to clipboard
common
fun alignWithin(other: Rect, target: Size): Position
Returns the Position which can be used to properly align a boundable with target size withinother.
clone
Link copied to clipboard
common
protected fun clone(): Any
compareTo
Link copied to clipboard
common
operator override fun compareTo(other: ComponentAlignment): Int
equals
Link copied to clipboard
common
operator override fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
common
override fun hashCode(): Int
toString
Link copied to clipboard
common
open override fun toString(): String

Properties

aroundFn
Link copied to clipboard
common
private val aroundFn: (other: Rect, target: Size) -> Position
name
Link copied to clipboard
common
val name: String
ordinal
Link copied to clipboard
common
val ordinal: Int
withinFn
Link copied to clipboard
common
private val withinFn: (other: Rect, target: Size) -> Position