private void OnMouseClick3dAction(Mouse3dPosition point)
        {
            if (point.IsMouseDown)
            {
                _xMin = point.Point.X();
                _yMin = point.Point.Y();

                // Build the selection rectangle
                rectangle = new Rectangle2D(Context2d, _xMin, _yMin, 1, 1, 0);
                // Set the line type to selection
                rectangle.SetAspect(DrawingUtils.GetSelectionAspectLine());
            }
            else
            {
                _xMax = point.Point.X();
                _yMax = point.Point.Y();

                // Remove the selection rectangle from the view and release it
                Context2d.Erase(rectangle, true, false);
                rectangle = null;

                // Test if the zoom window is greater than a minimal window
                if ((Math.Abs(_xMin - _xMax) > 1) || (Math.Abs(_yMin - _yMax) > 1))
                {
                    // Do the zoom window between Pmin and Pmax
                    int xMin = 0, yMin = 0, xMax = 0, yMax = 0;
                    GeomUtils.TranslateCoordinatesFromOCC(View2d, _xMin, _yMin, ref xMin, ref yMin);
                    GeomUtils.TranslateCoordinatesFromOCC(View2d, _xMax, _yMax, ref xMax, ref yMax);
                    View2d.WindowFit(xMin, yMin, xMax, yMax);
                }

                View2d.Update();
            }
        }
 public override void MouseMoveHandler(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Left)
     {
         View2d.Zoom(_xMax, _yMax, e.X, e.Y, 0.005);
         _xMax = e.X;
         _yMax = e.Y;
     }
 }
 public override void MouseMoveHandler(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Left)
     {
         View2d.Pan(e.X - _xMax, _yMax - e.Y);
         _xMax = e.X;
         _yMax = e.Y;
     }
 }
        public override void MouseMoveHandler(object sender, MouseEventArgs e)
        {
            if (Viewer2d.IsActive())
            {
                View2d.ShowHit(e.X, e.Y);
            }
            if (!Viewer2d.IsActive())
            {
                View2d.EraseHit();
            }

            Context2d.MoveTo(e.X, e.Y, View2d);
        }
 public override void OnActivate()
 {
     View2d.Fitall();
 }
 public override void MouseDownHandler(object sender, MouseEventArgs e)
 {
     View2d.Place(e.X, e.Y, 1);
 }