Merge pull request #4491 from Zaczero/master

Smoothened regionAnimation rectangle animation
This commit is contained in:
Jaex 2019-11-19 00:28:06 +03:00 committed by GitHub
commit c0fd65b9b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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();
}