///------------------------------------------------------------------------------------------------- /// \fn private void MainView_MouseMove(object sender, MouseEventArgs e) /// /// \brief Event handler. Called by MainView for mouse move events /// /// \param sender Source of the event. /// \param e Mouse event information. ///------------------------------------------------------------------------------------------------- private void MainView_MouseMove(object sender, MouseEventArgs e) { if (isEnabled) { using (Graphics g = Graphics.FromImage(mainView.Image)) { LineTool lt = (LineTool)(ToolKit.GetInstance().LineTool); lt.lineAgent.DrawLine(g, Setting.GetInstance().Pen, oldLocation, e.Location); oldLocation = e.Location; mainView.Invalidate(); } } }
///------------------------------------------------------------------------------------------------- /// \fn private ToolKit(PictureBox mainView) /// /// \brief Constructor /// /// \param mainView The main view control. ///------------------------------------------------------------------------------------------------- private ToolKit(PictureBox mainView) { this.mainView = mainView; pointerTool = new PointerTool(mainView); lineTool = new LineTool(mainView); //pencilTool = new PencilTool (mainView); circleTool = new CircleTool(mainView); clipTool = new ClipTool(mainView); scanFillTool = new ScanFillTool(mainView); floodFillTool = new FloodFillTool(mainView); ellipseTool = new EllipseTool(mainView); polygonTool = new PolygonTool(mainView); resizeTool = new ResizeTool(mainView); rotatingTool = new RotatingTool(mainView); bSplineTool = new BSplineTool(mainView); bezierTool = new BezierTool(mainView); }