Package-level declarations

Types

Link copied to clipboard
class AndroidRegionDecoder(decoder: BitmapRegionDecoder) : RegionDecoder
Link copied to clipboard
Link copied to clipboard
interface RegionDecoder
Link copied to clipboard
data class RenderBlock(var inBound: Boolean = false, var inSampleSize: Int = 1, var renderOffset: IntOffset = IntOffset.Zero, var renderSize: IntSize = IntSize.Zero, var sliceRect: Rect = Rect(Offset.Zero, Size.Zero), bitmap: ImageBitmap? = null)
Link copied to clipboard
class RotationIllegalException(msg: String = "Illegal rotation angle.") : RuntimeException
Link copied to clipboard
data class SamplingCanvasViewPort(val scale: Float, val visualRect: Rect)

渲染的视口对象

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

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

Link copied to clipboard

Properties

Functions

Link copied to clipboard
fun calculateInSampleSize(srcWidth: Int, reqWidth: Int): Int
Link copied to clipboard
fun checkRectInBound(stX1: Float, stY1: Float, edX1: Float, edY1: Float, stX2: Float, stY2: Float, edX2: Float, edY2: Float): Boolean
Link copied to clipboard
fun <E> Channel<E>.clear()
Link copied to clipboard

通过Exif接口获取SamplingDecoder的旋转方向

Link copied to clipboard
Link copied to clipboard

从ZoomableView状态直接获取当前视口对象

Link copied to clipboard
@Composable
fun rememberSamplingDecoder(bytes: ByteArray?, rotation: SamplingDecoder.Rotation = SamplingDecoder.Rotation.ROTATION_0): Pair<SamplingDecoder?, Exception?>
Link copied to clipboard
@Composable
fun SamplingCanvas(samplingDecoder: SamplingDecoder, viewPort: SamplingCanvasViewPort)

用于ImageViewer/ZoomableView进行分块显示大型图片的配套组件

Link copied to clipboard
fun Rect.toAndroidRect(): Rect