Skip to content

Commit 623b6dc

Browse files
committed
Fix incorrect width when invertIfNegative is disabled
1 parent 8b5a06c commit 623b6dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Pinta.Core/Classes/Rectangle.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public static RectangleD FromPoints (in PointD a, in PointD b, bool invertIfNega
6868
double y2 = Math.Max (a.Y, b.Y);
6969
return new (x1, y1, x2 - x1, y2 - y1);
7070
} else {
71-
double width = Math.Max (0.0, b.Y - a.X);
71+
double width = Math.Max (0.0, b.X - a.X);
7272
double height = Math.Max (0.0, b.Y - a.Y);
7373
return new (a.X, a.Y, width, height);
7474
}

0 commit comments

Comments
 (0)