VixenModules.Preview.VixenPreview.Shapes.PreviewLine.MouseMove C# (CSharp) Method

MouseMove() public method

public MouseMove ( int x, int y, int changeX, int changeY ) : void
x int
y int
changeX int
changeY int
return void
        public override void MouseMove(int x, int y, int changeX, int changeY)
        {
            PreviewPoint point = PointToZoomPoint(new PreviewPoint(x, y));
            // See if we're resizing
            if (_selectedPoint != null) {
                _selectedPoint.X = point.X;
                _selectedPoint.Y = point.Y;
                Layout();
                SelectDragPoints();
            }
                // If we get here, we're moving
            else {
                //_points[0].X = p1Start.X + changeX;
                //_points[0].Y = p1Start.Y + changeY;
                //_points[1].X = p2Start.X + changeX;
                //_points[1].Y = p2Start.Y + changeY;

                _points[0].X = Convert.ToInt32(p1Start.X * ZoomLevel) + changeX;
                _points[0].Y = Convert.ToInt32(p1Start.Y * ZoomLevel) + changeY;
                _points[1].X = Convert.ToInt32(p2Start.X * ZoomLevel) + changeX;
                _points[1].Y = Convert.ToInt32(p2Start.Y * ZoomLevel) + changeY;

                PointToZoomPointRef(_points[0]);
                PointToZoomPointRef(_points[1]);

                Layout();
            }
        }