Example #1
0
        private void DxHostOnMouseWheel(object sender, MouseWheelEventArgs e)
        {
            var canMouse = ConvertToCanonical(new Vector2(mousePosition.X, mousePosition.Y));

            // convert to canonical coordinates
            currentView.OnScroll(
                (float)e.Delta,
                canMouse
                );

            DispatchRecomputeTexelColor();
        }
        private void DxHostOnMouseWheel(object sender, MouseWheelEventArgs e)
        {
            // don't interrupt when processing
            if (models.Progress.IsProcessing)
            {
                return;
            }

            var canMouse = ConvertToCanonical(new Vector2(mousePosition.X, mousePosition.Y));

            // convert to canonical coordinates
            currentView.OnScroll(
                (float)e.Delta,
                canMouse
                );

            DispatchRecomputeTexelColor();
        }
Example #3
0
        private void GlControlOnMouseWheel(object sender, MouseEventArgs mouseEventArgs)
        {
            // dont interrupt when processing
            if (models.Progress.IsProcessing)
            {
                return;
            }

            // convert to canonical coordinates
            currentView.OnScroll(
                (float)mouseEventArgs.Delta,
                ConvertToCanonical(new Vector2((float)mouseEventArgs.X, (float)mouseEventArgs.Y))
                );

            models.Display.TexelPosition = currentView.GetTexelPosition(
                ConvertToCanonical(new Vector2((float)mouseEventArgs.X, (float)mouseEventArgs.Y)));

            models.GlContext.RedrawFrame();
        }