Ejemplo n.º 1
0
        public void ZoomBy(int delta, Point relativeTo)
        {
            double ticks = delta / 120.0;

            Point adjust = relativeTo;
            double scaleStart = PageNavigation.Scale;
            PageNavigation.ZoomBy(ticks / 3.0);
            double scaleEnd = PageNavigation.Scale;
            double scalar = 1 / scaleEnd - 1 / scaleStart;
            PageNavigation.PanBy(new Point(adjust.X * scalar, adjust.Y * scalar));
        }