Fix boxes and circles drawing.

This commit is contained in:
Vladimir Poleh 2020-01-11 01:06:00 +03:00
commit 5e0cb799bd

View file

@ -30,7 +30,6 @@ namespace Greenshot.Gfx.Legacy
/// </summary>
public static partial class ScaleHelper
{
/// <summary>
/// calculates the Size an element must be resized to, in order to fit another element, keeping aspect ratio
/// </summary>
@ -377,6 +376,10 @@ namespace Greenshot.Gfx.Legacy
boundsAfterResize = boundsAfterResize.Resize((float)Math.Round(dist * Math.Cos(angle / 180 * Math.PI)), (float)Math.Round(dist * Math.Sin(angle / 180 * Math.PI)));
}
else
{
boundsAfterResize = boundsAfterResize.Resize(cursorX - boundsBeforeResize.Left, cursorY - boundsBeforeResize.Top);
}
if (centeredScale)
{