예제 #1
0
        public void OnPinchEnded()
        {
            View view = GetView();

            if (view == null)
            {
                return;
            }

            IPinchGestureController pinchGesture = PinchGesture;

            pinchGesture?.SendPinchEnded(view);
        }
예제 #2
0
        public bool OnPinch(float scale, Point scalePoint)
        {
            View view = GetView();

            if (view == null)
            {
                return(false);
            }

            IPinchGestureController pinchGesture = PinchGesture;

            if (pinchGesture == null)
            {
                return(true);
            }

            var scalePointTransformed = new Point(scalePoint.X / view.Width, scalePoint.Y / view.Height);

            pinchGesture.SendPinch(view, 1 + (scale - 1) * _pinchStartingScale, scalePointTransformed);

            return(true);
        }