diff --git a/ShareX.ScreenCaptureLib/Shapes/BaseShape.cs b/ShareX.ScreenCaptureLib/Shapes/BaseShape.cs index 611da5040..3bf2038ca 100644 --- a/ShareX.ScreenCaptureLib/Shapes/BaseShape.cs +++ b/ShareX.ScreenCaptureLib/Shapes/BaseShape.cs @@ -125,11 +125,11 @@ public virtual void Resize(int x, int y, bool fromBottomRight) { if (fromBottomRight) { - Rectangle = Rectangle.SizeOffset(x, y); + EndPosition = EndPosition.Add(x, y); } else { - Rectangle = Rectangle.LocationOffset(x, y).SizeOffset(-x, -y); + StartPosition = StartPosition.Add(x, y); } } diff --git a/ShareX.ScreenCaptureLib/Shapes/Drawing/CursorDrawingShape.cs b/ShareX.ScreenCaptureLib/Shapes/Drawing/CursorDrawingShape.cs index 98699ef5a..fc651ca40 100644 --- a/ShareX.ScreenCaptureLib/Shapes/Drawing/CursorDrawingShape.cs +++ b/ShareX.ScreenCaptureLib/Shapes/Drawing/CursorDrawingShape.cs @@ -51,7 +51,7 @@ public void UpdateCursor(IntPtr cursorHandle, Point position) cursorBitmap = icon.ToBitmap(); StartPosition = position; - EndPosition = new Point(position.X + cursorBitmap.Size.Width, position.Y + cursorBitmap.Size.Height); + EndPosition = new Point(position.X + cursorBitmap.Size.Width - 1, position.Y + cursorBitmap.Size.Height - 1); } public override void ShowNodes() diff --git a/ShareX.ScreenCaptureLib/Shapes/Drawing/ImageDrawingShape.cs b/ShareX.ScreenCaptureLib/Shapes/Drawing/ImageDrawingShape.cs index 4d619cf1b..fe95e1ad0 100644 --- a/ShareX.ScreenCaptureLib/Shapes/Drawing/ImageDrawingShape.cs +++ b/ShareX.ScreenCaptureLib/Shapes/Drawing/ImageDrawingShape.cs @@ -55,7 +55,8 @@ public void SetImage(Image img, bool centerImage) location = Rectangle.Location; } - Rectangle = new Rectangle(location, size); + StartPosition = location; + EndPosition = new Point(location.X + size.Width - 1, location.Y + size.Height - 1); } } diff --git a/ShareX.ScreenCaptureLib/Shapes/Drawing/StepDrawingShape.cs b/ShareX.ScreenCaptureLib/Shapes/Drawing/StepDrawingShape.cs index 659636bd5..764bc5745 100644 --- a/ShareX.ScreenCaptureLib/Shapes/Drawing/StepDrawingShape.cs +++ b/ShareX.ScreenCaptureLib/Shapes/Drawing/StepDrawingShape.cs @@ -41,7 +41,7 @@ public class StepDrawingShape : EllipseDrawingShape public StepDrawingShape() { StartPosition = new Point(0, 0); - EndPosition = new Point(DefaultSize, DefaultSize); + EndPosition = new Point(DefaultSize - 1, DefaultSize - 1); } public override void ShowNodes() @@ -53,7 +53,7 @@ public override void OnCreating() Manager.IsMoving = true; Point pos = InputManager.ClientMousePosition; StartPosition = new Point(pos.X - DefaultSize / 2, pos.Y - DefaultSize / 2); - EndPosition = new Point(pos.X + DefaultSize / 2, pos.Y + DefaultSize / 2); + EndPosition = new Point(pos.X + DefaultSize / 2 - 1, pos.Y + DefaultSize / 2 - 1); } public override void OnConfigLoad() diff --git a/ShareX.ScreenCaptureLib/Shapes/Drawing/TextDrawingShape.cs b/ShareX.ScreenCaptureLib/Shapes/Drawing/TextDrawingShape.cs index 19dd576e5..387fd587a 100644 --- a/ShareX.ScreenCaptureLib/Shapes/Drawing/TextDrawingShape.cs +++ b/ShareX.ScreenCaptureLib/Shapes/Drawing/TextDrawingShape.cs @@ -164,7 +164,7 @@ public void AutoSize(bool center) } StartPosition = location; - EndPosition = new Point(location.X + size.Width, location.Y + size.Height); + EndPosition = new Point(location.X + size.Width - 1, location.Y + size.Height - 1); } } } \ No newline at end of file