TiledImageCachePolicy

data class TiledImageCachePolicy(val maxEntries: Int = 512, val maxBytes: Long, val overscanTiles: Int = 1)(source)

Bounds one retained tiled-image attachment's current tile working set.

The component reserves one entry and the level's complete RGBA8 byte cost before subscribing, even while a tile is empty. The working set contains only tiles intersecting the visible rectangle plus TiledImageCachePolicy.overscanTiles, together with visible coarser fallback tiles; it retains no offscreen history beyond that margin. If the preferred level cannot fit, the component selects a coarser level before changing subscriptions. If even the coarsest visible set cannot fit, layout fails before partially installing that set.

Throws

when either maximum is not positive or the margin is negative.

Constructors

Link copied to clipboard
constructor(maxEntries: Int = 512, maxBytes: Long, overscanTiles: Int = 1)

Types

Link copied to clipboard
object Companion

Default bounded working-set policy for ordinary image viewers and maps.

Properties

Link copied to clipboard

positive maximum reserved straight-RGBA8 byte cost of simultaneous observations.

Link copied to clipboard

positive maximum number of simultaneous tile observations.

Link copied to clipboard

non-negative tile margin retained around the selected level's visible range; coarser fallback levels retain only visible tiles.