Revision: 14161
          http://sourceforge.net/p/skim-app/code/14161
Author:   hofman
Date:     2024-04-01 15:02:58 +0000 (Mon, 01 Apr 2024)
Log Message:
-----------
Don't use CGRectGetMinX and CGRectGetMinY on non initialized rect, they get 
confused

Modified Paths:
--------------
    trunk/SKLoupeController.m

Modified: trunk/SKLoupeController.m
===================================================================
--- trunk/SKLoupeController.m   2024-04-01 09:41:07 UTC (rev 14160)
+++ trunk/SKLoupeController.m   2024-04-01 15:02:58 UTC (rev 14161)
@@ -234,8 +234,8 @@
     CGRect r;
     r.origin.x = round(CGRectGetMinX(rect) * scale) / scale;
     r.origin.y = round(CGRectGetMinY(rect) * scale) / scale;
-    r.size.width = round(CGRectGetMaxX(rect) * scale) / scale - 
CGRectGetMinX(r);
-    r.size.height = round(CGRectGetMaxY(rect) * scale) / scale - 
CGRectGetMinY(r);
+    r.size.width = round(CGRectGetMaxX(rect) * scale) / scale - r.origin.x;
+    r.size.height = round(CGRectGetMaxY(rect) * scale) / scale - r.origin.y;
     return CGRectGetWidth(r) > 0.0 && CGRectGetHeight(r) > 0.0 ? r : 
CGRectZero;
 }
 

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to