ImageViewerState

class ImageViewerState(offsetX: Float = DEFAULT_OFFSET_X, offsetY: Float = DEFAULT_OFFSET_Y, scale: Float = DEFAULT_SCALE, rotation: Float = DEFAULT_ROTATION, animationSpec: AnimationSpec<Float>? = null, crossfadeAnimationSpec: AnimationSpec<Float>? = null) : CoroutineScope

Deprecated

com.origeek.imageViewer下的全部类和方法均已弃用! 请使用新版本:com.jvziyaoyao.viewer。

viewer状态对象,用于记录compose组件状态

Constructors

Link copied to clipboard
constructor(offsetX: Float = DEFAULT_OFFSET_X, offsetY: Float = DEFAULT_OFFSET_Y, scale: Float = DEFAULT_SCALE, rotation: Float = DEFAULT_ROTATION, animationSpec: AnimationSpec<Float>? = null, crossfadeAnimationSpec: AnimationSpec<Float>? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
suspend fun fixToBound()

修正offsetX,offsetY的位置

Link copied to clipboard
suspend fun reset(animationSpec: AnimationSpec<Float> = defaultAnimateSpec)

设置回初始值

Link copied to clipboard
suspend fun resetImmediately()

立即设置回初始值

Link copied to clipboard
suspend fun scaleToMax(offset: Offset, animationSpec: AnimationSpec<Float>? = null)

放大到最大

Link copied to clipboard
suspend fun toggleScale(offset: Offset, animationSpec: AnimationSpec<Float> = defaultAnimateSpec)

放大或缩小