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> /// </summary>
public static partial class ScaleHelper public static partial class ScaleHelper
{ {
/// <summary> /// <summary>
/// calculates the Size an element must be resized to, in order to fit another element, keeping aspect ratio /// calculates the Size an element must be resized to, in order to fit another element, keeping aspect ratio
/// </summary> /// </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))); 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) if (centeredScale)
{ {