library / com.otaliastudios.zoom / ZoomEngine / moveTo

moveTo

open fun moveTo(zoom: Float, x: Float, y: Float, animate: Boolean): Unit

Overrides ZoomApi.moveTo

A low level API that can animate both zoom and pan at the same time. Zoom might not be the actual matrix scale, see ZoomApi.zoom and ZoomApi.realZoom. The coordinates are referred to the content size passed in setContentSize so they do not depend on current zoom.

Parameters

zoom - the desired zoom value

x - the desired left coordinate

y - the desired top coordinate

animate - whether to animate the transition