예제 #1
0
        /// <summary>
        /// The construtor for our custom ZedGraph
        /// </summary>
        public MyZedGraph()
        {
            m_snapBoxPosition.X = 0;
            m_snapBoxPosition.Y = 0;

            ZoomEvent += new ZoomEventHandler(MyZedGraph_ZoomEvent);
            Resize    += new EventHandler(MyZedGraph_Resize);
            InitializeGraph();
        }
예제 #2
0
        /// <summary>
        /// Unmagnifies the sketch by a preset amount.
        /// </summary>
        public void ZoomOut()
        {
            inkPic.Renderer.Scale(SketchPanelConstants.ZoomOutFactor, SketchPanelConstants.ZoomOutFactor, true);

            ZoomEventHandler zoomEvent = ZoomEvent;

            if (zoomEvent != null)
            {
                zoomEvent(SketchPanelConstants.ZoomOutFactor);
            }

            this.resizeInkPicture();
            inkPic.Refresh();
        }