Zoomable State
class ZoomableState(val minScale: Float = 1.0f, val maxScale: Float = Float.MAX_VALUE, initialTranslateX: Float = 0.0f, initialTranslateY: Float = 0.0f, initialScale: Float = minScale)
A state object that can be hoisted to observe scale and translate for ZoomableLayout.
In most cases, this will be created via rememberZoomableState.
Parameters
min Scale
the minimum scale value for ZoomableState.minScale
max Scale
the maximum scale value for ZoomableState.maxScale
initial Translate X
the initial translateX value for ZoomableState.translateX
initial Translate Y
the initial translateY value for ZoomableState.translateY
initial Scale
the initial scale value for ZoomableState.scale
Constructors
Properties
Link copied to clipboard
The current scale value for ZoomableLayout.
Link copied to clipboard
The current translateX value for ZoomableLayout.
Link copied to clipboard
The current translateY value for ZoomableLayout.
Functions
Link copied to clipboard
suspend fun animateScaleTo(scale: Float, animationSpec: <Error class: unknown class><Float> = spring(), initialVelocity: Float = 0.0f): <Error class: unknown class>
Animates scale of ZoomableLayout to given scale.
Link copied to clipboard
suspend fun animateTranslationTo(translation: <Error class: unknown class>, animationSpec: <Error class: unknown class><Float> = spring(), initialVelocity: Float = 0.0f): <Error class: unknown class>
Animates translation of ZoomableLayout to given translation.
Link copied to clipboard
Instantly sets scale of ZoomableLayout to given scale.