Browse Source

[旋转] - 自定义注释stamp、signature,缩放以后再旋转恢复之前大小

liujiajie 11 months ago
parent
commit
f594f6029f

+ 1 - 0
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/Signature/CPDFListSignatureAnnotation.swift

@@ -7,6 +7,7 @@
 
 import Cocoa
 
+@objcMembers
 class CPDFListSignatureAnnotation: CPDFSignatureAnnotation {
     var stamp: CStampSignatureObject?
     var _rotation: Int = 0

+ 1 - 0
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/Stamp/CPDFListStampAnnotation.swift

@@ -7,6 +7,7 @@
 
 import Cocoa
 
+@objcMembers
 class CPDFListStampAnnotation: CPDFStampAnnotation {
     
     @objc var stamp: CStampSignatureObject?

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

@@ -3725,6 +3725,12 @@ static inline CPDFAreaOfInterest CAreaOfInterestForResizeHandle(CRectEdges mask,
                             [newActiveAnnotation isKindOfClass:[CPDFSignatureAnnotation class]] ||
                             [newActiveAnnotation isKindOfClass:[CPDFWidgetAnnotation class]]) {
                             [newActiveAnnotation updateAppearanceStream];
+                            if ([newActiveAnnotation isKindOfClass:[CPDFListStampAnnotation class]]) {
+                                ((CPDFListStampAnnotation *)newActiveAnnotation).borderBounds = newActiveAnnotation.bounds;
+                            }
+                            if ([newActiveAnnotation isKindOfClass:[CPDFListSignatureAnnotation class]]) {
+                                ((CPDFListSignatureAnnotation *)newActiveAnnotation).borderBounds = newActiveAnnotation.bounds;
+                            }
                         }
                     }