Revision: 14623
          http://sourceforge.net/p/skim-app/code/14623
Author:   hofman
Date:     2024-11-01 22:55:01 +0000 (Fri, 01 Nov 2024)
Log Message:
-----------
return empty image when rect is empty

Modified Paths:
--------------
    trunk/SkimNotes/PDFAnnotation_SKNExtensions.m

Modified: trunk/SkimNotes/PDFAnnotation_SKNExtensions.m
===================================================================
--- trunk/SkimNotes/PDFAnnotation_SKNExtensions.m       2024-11-01 09:44:32 UTC 
(rev 14622)
+++ trunk/SkimNotes/PDFAnnotation_SKNExtensions.m       2024-11-01 22:55:01 UTC 
(rev 14623)
@@ -165,6 +165,8 @@
 
 static UIImage *appearanceImageForAnnotation(PDFAnnotation *annotation) {
     CGRect rect = [annotation bounds];
+    if (CGRectIsEmpty(rect))
+        return nil;
     BOOL needsRemove = NO;
     PDFPage *page = [annotation page];
     if (page == nil) {
@@ -204,6 +206,8 @@
 
 static NSImage *appearanceImageForAnnotation(PDFAnnotation *annotation) {
     NSRect rect = [annotation bounds];
+    if (NSIsEmptyRect(rect))
+        return nil;
     BOOL needsRemove = NO;
     PDFPage *page = [annotation page];
     if (page == nil) {

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