SamplingDecoder

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

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

Parameters

thumbnails

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

Constructors

Link copied to clipboard
constructor(decoder: BitmapRegionDecoder, rotation: SamplingDecoder.Rotation = Rotation.ROTATION_0, onRelease: () -> Unit = {}, thumbnails: Bitmap? = 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
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

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

解码渲染区域

Link copied to clipboard
fun forEachBlock(action: (block: RenderBlock, column: Int, row: Int) -> Unit)
Link copied to clipboard
fun getRotateBitmap(bitmap: Bitmap, degree: Float): Bitmap
Link copied to clipboard
fun release()
Link copied to clipboard
Link copied to clipboard
fun startRenderQueue(onUpdate: () -> Unit)