public void Run() { float t = Interpolate(); float deltaScale = CalculateDeltaScale(t); view.ScaleImage(deltaScale, bitmapX, bitmapY, stretchImageToSuper); TranslateImageToCenterTouchPosition(t); view.FixScaleTrans(); view.ImageMatrix = view.matrix; if (t < 1f) { // // We haven't finished zooming // view.CompatPostOnAnimation(this); } else { // // Finished zooming // view.SetState(TouchState.NONE); } }
public override bool OnScale(ScaleGestureDetector detector) { view.ScaleImage(detector.ScaleFactor, detector.FocusX, detector.FocusY, true); return(true); }