ViewPicture Function
@Composable fun ViewPicture(modifier: Modifier, picture: ScanPicture?, imageOrientation: ScanOrientation, scaleToFit: Boolean = true, pagerOrientation: Orientation? = null, params: ZoomImageParams = defaultZoomImageParams(PaddingValues(10.dp)), onPictureReady: suspend (Boolean) -> Unit = { _ -> })
A Composable to show the ScanPicture with zoom and pan.
Parameters
- modifier — a Compose Modifier.
- picture — the picture to show
- imageOrientation — the ScanOrientation for the
picture. - scaleToFit — disable any zoom and pan.
- pagerOrientation — integration with a androidx.compose.foundation.pager.Pager
- params — the ZoomImageParams to configure ViewPicture
- onPictureReady — called with
falsewhen loading starts, and withtrueonce the page is displayed. It is not called withtrueat all if no picture is supplied or loading fails, so do not treat a singlefalseas a transient state.