Pārlūkot izejas kodu

PDFListView - 绘制注释相关

dinglingui 1 gadu atpakaļ
vecāks
revīzija
871cb4ffaf

+ 9 - 9
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListViewExtension/CPDFListView+Event.m

@@ -1674,15 +1674,15 @@ static inline CPDFAreaOfInterest CAreaOfInterestForResizeHandle(CRectEdges mask,
                 [CPDFInkAnnotation addPoint:point toCNotesPath:bezierPath];
             }
             point = [self convertPoint:[theEvent locationInPDFListView:self] toPage:page];
-            if(point.x < 0)
-                point.x = 0;
-             else if (point.x> page.bounds.size.width)
-                point.x = page.bounds.size.width;
-            
-            if(point.y < 0)
-                point.y = 0;
-            else if (point.y > page.bounds.size.height)
-                point.y = page.bounds.size.height;
+            if(point.x < CGRectGetMinX(page.bounds))
+                point.x = CGRectGetMinX(page.bounds);
+             else if (point.x> CGRectGetMaxX(page.bounds))
+                point.x = CGRectGetMaxX(page.bounds);
+            
+            if(point.y < CGRectGetMinY(page.bounds))
+                point.y = CGRectGetMinY(page.bounds);
+            else if (point.y > CGRectGetMaxY(page.bounds))
+                point.y = CGRectGetMaxY(page.bounds);
             
             
             if (isOption && wantsBreak == NO) {