From c9bff5c70f0b4207fa3f9a86eb5bb913b693bd58 Mon Sep 17 00:00:00 2001 From: Kamil Monicz Date: Mon, 18 Nov 2019 20:18:19 +0100 Subject: [PATCH] Updated regionAnimation.FromRectangle to use the last current rectangle for smooth animation --- ShareX.ScreenCaptureLib/Forms/RegionCaptureForm.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ShareX.ScreenCaptureLib/Forms/RegionCaptureForm.cs b/ShareX.ScreenCaptureLib/Forms/RegionCaptureForm.cs index 141e7c069..4bd4a04f6 100644 --- a/ShareX.ScreenCaptureLib/Forms/RegionCaptureForm.cs +++ b/ShareX.ScreenCaptureLib/Forms/RegionCaptureForm.cs @@ -793,7 +793,11 @@ private void Draw(Graphics g) { if (!ShapeManager.PreviousHoverRectangle.IsEmpty && ShapeManager.CurrentHoverShape.Rectangle != ShapeManager.PreviousHoverRectangle) { - regionAnimation.FromRectangle = ShapeManager.PreviousHoverRectangle; + if (regionAnimation.CurrentRectangle.Width > 2 && regionAnimation.CurrentRectangle.Height > 2) + regionAnimation.FromRectangle = regionAnimation.CurrentRectangle; + else + regionAnimation.FromRectangle = ShapeManager.PreviousHoverRectangle; + regionAnimation.ToRectangle = ShapeManager.CurrentHoverShape.Rectangle; regionAnimation.Start(); }