TransformableState
@JvmDefaultWithCompatibility
interface TransformableState
State of transformable
. Allows for a granular control of how different gesture transformations
are consumed by the user as well as to write custom transformation methods using transform
suspend function.
Properties
val isTransformInProgress: Boolean
Whether this TransformableState
is currently transforming by gesture or programmatically or
not.
Functions
suspend fun transform(
transformPriority: MutatePriority = MutatePriority.Default,
block: suspend TransformScope.() -> Unit,
)
Call this function to take control of transformations and gain the ability to send transform
events via TransformScope.transformBy
. All actions that change zoom, pan or rotation values
must be performed within a transform
block (even if they don't call any other methods on
this object) in order to guarantee that mutual exclusion is enforced.
If transform
is called from elsewhere with the transformPriority
higher or equal to
ongoing transform, ongoing transform will be canceled.