Compose Camera LogoCompose Camera
APICore ModuleData Classes

ZoomState

Documentation for ZoomState data class.

ZoomState

Holds the current status of the camera's zoom level.

data class ZoomState(
    val zoomRatio: Float,
    val maxZoomRatio: Float,
    val minZoomRatio: Float
) {
    val linearZoom: Float // 0.0 to 1.0
}

Properties

PropertyTypeDescription
zoomRatioFloatThe current zoom magnification factor (e.g., 1.0x, 2.5x).
minZoomRatioFloatThe minimum supported zoom ratio for the current camera.
maxZoomRatioFloatThe maximum supported zoom ratio for the current camera.
linearZoomFloatThe current zoom level represented as a linear value between 0.0 and 1.0.

On this page