ZoomableViewState
open class ZoomableViewState(@FloatRange(from = 1.0) val maxScale: Float = MAX_SCALE_RATE, offsetX: Float = DEFAULT_OFFSET_X, offsetY: Float = DEFAULT_OFFSET_Y, scale: Float = DEFAULT_SCALE, rotation: Float = DEFAULT_ROTATION, animationSpec: AnimationSpec<Float>? = null) : CoroutineScope
viewer状态对象,用于记录compose组件状态
Parameters
offsetX
X轴偏移量
offsetY
Y轴偏移量
scale
缩放率
rotation
旋转角度
animationSpec
动画窗格
Constructors
Link copied to clipboard
constructor(@FloatRange(from = 1.0) maxScale: Float = MAX_SCALE_RATE, offsetX: Float = DEFAULT_OFFSET_X, offsetY: Float = DEFAULT_OFFSET_Y, scale: Float = DEFAULT_SCALE, rotation: Float = DEFAULT_ROTATION, animationSpec: AnimationSpec<Float>? = null)
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
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
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Functions
Link copied to clipboard
修正offsetX,offsetY的位置
Link copied to clipboard
fun ZoomableViewState.onGesture(scope: CoroutineScope, center: Offset, pan: Offset, zoom: Float, rotate: Float, event: PointerEvent): Boolean
输入手势事件
Link copied to clipboard
标记手势事件结束
Link copied to clipboard
标记手势事件开始
Link copied to clipboard
设置回初始值
Link copied to clipboard
立即设置回初始值
Link copied to clipboard
放大或缩小