Ejemplo n.º 1
0
        private static void OnPan(object sender, PanArgs args)
        {
            float deltaX, deltaY;

            Clutter.Event evnt = null;

            if (args.IsInterpolated)
            {
                ((PanAction)sender).GetInterpolatedDelta(out deltaX, out deltaY);
            }
            else
            {
                ((GestureAction)sender).GetMotionDelta(0, out deltaX, out deltaY);
                evnt = ((GestureAction)sender).GetLastEvent(0);
            }

            Console.WriteLine(String.Format("[{0}] panning dx:{1:0.##} dy:{2:0.##}",
                                            evnt == null ? "INTERPOLATED" : evnt.Type() == Clutter.EventType.Motion ? "MOTION" :
                                            evnt.Type() == Clutter.EventType.TouchUpdate ? "TOUCH UPDATE" :
                                            "?", deltaX, deltaY));

            args.RetVal = true;
        }