DpTouchBoundsExpansion
Class
Common
data class DpTouchBoundsExpansion(
val start: Dp,
val top: Dp,
val end: Dp,
val bottom: Dp,
val isLayoutDirectionAware: Boolean,
)
Describes the expansion of a PointerInputModifierNode
's touch bounds along each edges using
Dp
for units. See DpTouchBoundsExpansion
factories and Absolute
for convenient ways to
build DpTouchBoundsExpansion
.
Functions
fun roundToTouchBoundsExpansion(density: Density) =
with(density) {
TouchBoundsExpansion(
packedValue =
TouchBoundsExpansion.pack(
start.roundToPx(),
top.roundToPx(),
end.roundToPx(),
bottom.roundToPx(),
isLayoutDirectionAware,
)
)
}
Companion Object
Methods
Common
fun Absolute(
left: Dp = 0.dp,
top: Dp = 0.dp,
right: Dp = 0.dp,
bottom: Dp = 0.dp,
): DpTouchBoundsExpansion
Creates a DpTouchBoundsExpansion
that's unaware of LayoutDirection
. The left
,
top
, right
and bottom
represent the distance that the touch bounds is expanded
along the corresponding edge.