This commit is contained in:
Nathan_B 2025-08-18 23:47:54 +07:00 committed by GitHub
commit 92e8c478a6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1769,12 +1769,16 @@ namespace Greenshot.Editor.Drawing
int verticalCorrection = targetClipRectangle.Top % (int) _zoomFactor.Numerator; int verticalCorrection = targetClipRectangle.Top % (int) _zoomFactor.Numerator;
if (horizontalCorrection != 0) if (horizontalCorrection != 0)
{ {
targetClipRectangle = targetClipRectangle.ChangeX(-horizontalCorrection).ChangeWidth(horizontalCorrection); targetClipRectangle = targetClipRectangle
.ChangeX(targetClipRectangle.X - horizontalCorrection)
.ChangeWidth(targetClipRectangle.X + horizontalCorrection);
} }
if (verticalCorrection != 0) if (verticalCorrection != 0)
{ {
targetClipRectangle = targetClipRectangle.ChangeY(-verticalCorrection).ChangeHeight(verticalCorrection); targetClipRectangle = targetClipRectangle
.ChangeY(targetClipRectangle.Y - verticalCorrection)
.ChangeHeight(targetClipRectangle.Y + verticalCorrection);
} }
} }