[chronojump] Continuation of last commit



commit a2882332f5c023f64705dae3e37b77423e728166
Author: Xavier de Blas <xaviblas gmail com>
Date:   Thu May 27 11:16:28 2021 +0200

    Continuation of last commit

 src/utilGtk.cs | 8 ++++++++
 1 file changed, 8 insertions(+)
---
diff --git a/src/utilGtk.cs b/src/utilGtk.cs
index d505c08ca..0e3d8e0de 100644
--- a/src/utilGtk.cs
+++ b/src/utilGtk.cs
@@ -797,6 +797,14 @@ public class UtilGtk
                                maxY = points[i].Y;
                }
 
+               //fixes for a path with negative values
+               if(minY < 0)
+                       minY = 0;
+               if(maxY < 0)
+                       maxY = 0;
+               if(minY > maxY)
+                       maxY = minY;
+
                //if points are on an horiz line, eg minY == maxY == 346, height is 1 point
                int width = (maxX - minX) + 1;
                int height = (maxY - minY) + 1;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]