Package-level declarations

Types

Link copied to clipboard
internal sealed interface DecodedImageBitmap

Defines image decode state for Base64-backed UI images.

Link copied to clipboard
private data class ImageContentSize(val width: Float, val height: Float)

Carries ImageContentSize data through the SDAI presentation layer.

Link copied to clipboard
sealed interface ZoomableImageSource

Defines the ZoomableImageSource contract for the SDAI presentation layer.

Properties

Link copied to clipboard

Exposes the ZoomableImageSource value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the ZoomableImageSource value used by the SDAI presentation layer.

Link copied to clipboard
private const val ZOOM_EPSILON: Float = 0.01f

Functions

Link copied to clipboard
private fun Float.coerceInBounds(containerSize: Float, contentSize: Float, scale: Float): Float

Executes the coerceInBounds step in the SDAI presentation layer.

Link copied to clipboard
private suspend fun PointerInputScope.detectZoomableImageGestures(isPanningEnabled: () -> Boolean, onGesture: (pan: Offset, zoom: Float) -> Unit)
Link copied to clipboard

Decodes Base64 image content away from the UI thread.

Link copied to clipboard
private fun ZoomableImageSource.sizeForContainer(containerSize: IntSize, fitToWidth: Boolean): ImageContentSize

Executes the sizeForContainer step in the SDAI presentation layer.

Link copied to clipboard
fun ZoomableImage(modifier: Modifier = Modifier, source: ZoomableImageSource, backgroundColor: Color = MaterialTheme.colorScheme.background, minScale: Float = 1.0f, maxScale: Float = 6.0f, hideImage: Boolean = false, hideBlurRadius: Float = 69.0f, fitToWidth: Boolean = false, gesturesEnabled: Boolean = true, onScaleChange: (Float) -> Unit = {})

Renders the ZoomableImage UI for the SDAI presentation layer.