Exemplo n.º 1
0
            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);
                }
            }
Exemplo n.º 2
0
 public override bool OnScale(ScaleGestureDetector detector)
 {
     view.ScaleImage(detector.ScaleFactor, detector.FocusX, detector.FocusY, true);
     return(true);
 }