MutableMeasuringContext

open class MutableMeasuringContext(val canvasBounds: RectF, var density: Float, var isLtr: Boolean, var spToPx: (Float) -> Float) : MeasuringContext

A MeasuringContext implementation that facilitates the mutation of some of its properties.

Constructors

Link copied to clipboard
constructor(canvasBounds: RectF, density: Float, isLtr: Boolean, spToPx: (Float) -> Float)

Properties

Link copied to clipboard
open override val cacheStore: CacheStore

Caches drawing data.

Link copied to clipboard
open override val canvasBounds: RectF

The bounds of the Canvas.

Link copied to clipboard
open override var density: Float

The number of pixels corresponding to one density-independent pixel.

Link copied to clipboard
open override var isLtr: Boolean

Whether the layout direction is left to right.

Link copied to clipboard

Functions

Link copied to clipboard
open override fun spToPx(sp: Float): Float

Returns the number of pixels corresponding to sp scalable pixels.