diff --git a/ShareX.ScreenCaptureLib/Shapes/Region/FreehandRegionShape.cs b/ShareX.ScreenCaptureLib/Shapes/Region/FreehandRegionShape.cs index d2ee230bb..6dbe513ad 100644 --- a/ShareX.ScreenCaptureLib/Shapes/Region/FreehandRegionShape.cs +++ b/ShareX.ScreenCaptureLib/Shapes/Region/FreehandRegionShape.cs @@ -51,12 +51,7 @@ public override void OnUpdate() } else if (Manager.IsMoving) { - for (int i = 0; i < points.Count; i++) - { - points[i] = points[i].Add(InputManager.MouseVelocity.X, InputManager.MouseVelocity.Y); - } - - Rectangle = Rectangle.LocationOffset(InputManager.MouseVelocity.X, InputManager.MouseVelocity.Y); + Move(InputManager.MouseVelocity); } } @@ -79,5 +74,15 @@ public override void OnShapePathRequested(GraphicsPath gp, Rectangle rect) gp.CloseFigure(); } } + + public override void Move(int x, int y) + { + for (int i = 0; i < points.Count; i++) + { + points[i] = points[i].Add(x, y); + } + + Rectangle = Rectangle.LocationOffset(x, y); + } } } \ No newline at end of file