SamplingDecoder

class SamplingDecoder(decoder: RegionDecoder, rotation: SamplingDecoder.Rotation = Rotation.ROTATION_0, onRelease: () -> Unit = {}, thumbnails: ImageBitmap? = null) : CoroutineScope

用以提供SamplingCanvas显示大型图片,rememberSamplingDecoder,createSamplingDecoder

Parameters

thumbnails

默认显示的缓存图片,图片未完成加载时可用于显示占位

Constructors

Link copied to clipboard
constructor(decoder: RegionDecoder, rotation: SamplingDecoder.Rotation = Rotation.ROTATION_0, onRelease: () -> Unit = {}, thumbnails: ImageBitmap? = null)

Types

Link copied to clipboard

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val intrinsicSize: Size
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var thumbnail: ImageBitmap?

Functions

Link copied to clipboard
Link copied to clipboard
suspend fun createTempBitmap(targetWidth: Int = 720): ImageBitmap?
Link copied to clipboard
suspend fun decodeRegion(inSampleSize: Int, rect: Rect): ImageBitmap?

解码渲染区域

Link copied to clipboard
fun forEachBlock(action: (block: RenderBlock, column: Int, row: Int) -> Unit)
Link copied to clipboard
Link copied to clipboard
suspend fun release()
Link copied to clipboard
Link copied to clipboard
fun startRenderQueue(onUpdate: () -> Unit)