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 false when loading starts, and with true once the page is displayed. It is not called with true at all if no picture is supplied or loading fails, so do not treat a single false as a transient state.
Top