Google is committed to advancing racial equity for Black communities. See how.

ZoomState

interface ZoomState
androidx.camera.core.ZoomState

An interface which contains the zoom related information from a camera.

Applications can retrieve an instance via CameraInfo#getZoomState().

Summary

Public methods
abstract Float

Returns the linearZoom which is in range [0.

abstract Float

Returns the maximum zoom ratio.

abstract Float

Returns the minimum zoom ratio.

abstract Float

Returns the zoom ratio.

Public methods

getLinearZoom

abstract fun getLinearZoom(): Float

Returns the linearZoom which is in range [0..1].

LinearZoom 0 represents the minimum zoom while linearZoom 1.0 represents the maximum zoom.

getMaxZoomRatio

abstract fun getMaxZoomRatio(): Float

Returns the maximum zoom ratio.

getMinZoomRatio

abstract fun getMinZoomRatio(): Float

Returns the minimum zoom ratio.

getZoomRatio

abstract fun getZoomRatio(): Float

Returns the zoom ratio.