MouseMove() public method

Method to perform calculations based on the user interaction by moving the mouse
public MouseMove ( GraphicView activeView, System e ) : bool
activeView GraphicView
e System The Mouse event args
return bool
Exemplo n.º 1
0
        public bool MouseMove(object sender, MouseEventArgs e, Canguro.View.GraphicView activeView)
        {
            Viewport vp = activeView.Viewport;

            if (e.X >= vp.X && e.X <= vp.X + vp.Width && e.Y >= vp.Y && e.Y <= vp.Y + vp.Height)
            {
                bool needPaint = (trackingService != null);

                if (snapController.IsActive)
                {
                    needPaint |= snapController.MouseMove(activeView, e) || (trackingService != null);
                }

                if (hoverController.IsActive && !activeView.ModelRenderer.RenderOptions.ShowAnimated)
                {
                    needPaint |= hoverController.MouseMove(activeView, e);
                }

                if (needPaint && trackingService != null)
                {
                    trackingService.MouseMove(e.Location);
                }

                return(needPaint);
            }

            return(false);
        }