HazeEffectLayoutScope

Semantic layer-layout scope for a custom Haze effect.

modifierBounds is initially aligned to the modifier. Bounds returned by HazeEffectRenderer.calculateLayerBounds define the required effect layer around it.

Properties

Link copied to clipboard
abstract val density: Float
Link copied to clipboard
abstract val fontScale: Float
Link copied to clipboard
abstract val modifierBounds: Rect

Bounds of the modifier in the effect layer's coordinate space.

Functions

Link copied to clipboard
abstract fun <T> currentValueOf(local: CompositionLocal<T>): T

Returns the current value of local and observes it for bounds recalculation.

Link copied to clipboard
Link copied to clipboard
open fun Float.toDp(): Dp
open fun Int.toDp(): Dp
open fun TextUnit.toDp(): Dp
Link copied to clipboard
Link copied to clipboard
open fun Dp.toPx(): Float
Link copied to clipboard
open fun DpRect.toRect(): Rect
Link copied to clipboard
open fun DpSize.toSize(): Size
Link copied to clipboard
open fun Int.toSp(): TextUnit
open fun Dp.toSp(): TextUnit