|
@@ -3878,6 +3878,78 @@ static inline CPDFAreaOfInterest CAreaOfInterestForResizeHandle(CRectEdges mask,
|
|
|
if (self.pdfListViewDelegate && [self.pdfListViewDelegate respondsToSelector:@selector(PDFListViewAnnotationMeasureInfoChange:withAnnotation:)]) {
|
|
|
[self.pdfListViewDelegate PDFListViewAnnotationMeasureInfoChange:self withAnnotation:(CPDFPolygonAnnotation *)activeAnnotation];
|
|
|
}
|
|
|
+ } else if ([activeAnnotation isKindOfClass:[CPDFStampAnnotation class]]) {
|
|
|
+ CPDFStampAnnotation *stampAnnotation = (CPDFStampAnnotation *)activeAnnotation;
|
|
|
+ CPDFStampDraggedType draggedIndex = -1;
|
|
|
+ if ((resizeHandle & CMaxXEdgeMask) && (resizeHandle & CMinYEdgeMask)) {
|
|
|
+ draggedIndex = 2;
|
|
|
+ } else if ((resizeHandle & CMaxXEdgeMask) && (resizeHandle & CMaxYEdgeMask)) {
|
|
|
+ draggedIndex = 4;
|
|
|
+ } else if ((resizeHandle & CMinXEdgeMask) && (resizeHandle & CMaxYEdgeMask)) {
|
|
|
+ draggedIndex = 6;
|
|
|
+ } else if ((resizeHandle & CMinXEdgeMask) && (resizeHandle & CMinYEdgeMask)) {
|
|
|
+ draggedIndex = 0;
|
|
|
+ } else if (resizeHandle & CMinXEdgeMask) {
|
|
|
+ draggedIndex = 7;
|
|
|
+ } else if (resizeHandle & CMaxXEdgeMask) {
|
|
|
+ draggedIndex = 3;
|
|
|
+ } else if (resizeHandle & CMinYEdgeMask) {
|
|
|
+ draggedIndex = 1;
|
|
|
+ } else if (resizeHandle & CMaxYEdgeMask) {
|
|
|
+ draggedIndex = 5;
|
|
|
+ }
|
|
|
+ if (draggedIndex == -1) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ [stampAnnotation dragStampAnnotationWithCurrentPagePoint:currentPagePoint draggedIndex:draggedIndex];
|
|
|
+ } else if ([activeAnnotation isKindOfClass:[CPDFSignatureAnnotation class]]) {
|
|
|
+ CPDFSignatureAnnotation *signatureAnnotation = (CPDFSignatureAnnotation *)activeAnnotation;
|
|
|
+ CPDFSignatureDraggedType draggedIndex = -1;
|
|
|
+ if ((resizeHandle & CMaxXEdgeMask) && (resizeHandle & CMinYEdgeMask)) {
|
|
|
+ draggedIndex = 2;
|
|
|
+ } else if ((resizeHandle & CMaxXEdgeMask) && (resizeHandle & CMaxYEdgeMask)) {
|
|
|
+ draggedIndex = 4;
|
|
|
+ } else if ((resizeHandle & CMinXEdgeMask) && (resizeHandle & CMaxYEdgeMask)) {
|
|
|
+ draggedIndex = 6;
|
|
|
+ } else if ((resizeHandle & CMinXEdgeMask) && (resizeHandle & CMinYEdgeMask)) {
|
|
|
+ draggedIndex = 0;
|
|
|
+ } else if (resizeHandle & CMinXEdgeMask) {
|
|
|
+ draggedIndex = 7;
|
|
|
+ } else if (resizeHandle & CMaxXEdgeMask) {
|
|
|
+ draggedIndex = 3;
|
|
|
+ } else if (resizeHandle & CMinYEdgeMask) {
|
|
|
+ draggedIndex = 1;
|
|
|
+ } else if (resizeHandle & CMaxYEdgeMask) {
|
|
|
+ draggedIndex = 5;
|
|
|
+ }
|
|
|
+ if (draggedIndex == -1) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ [signatureAnnotation dragSignatureAnnotationWithCurrentPagePoint:currentPagePoint draggedIndex:draggedIndex];
|
|
|
+ } else if ([activeAnnotation isKindOfClass:[CPDFSignatureWidgetAnnotation class]]) {
|
|
|
+ CPDFSignatureWidgetAnnotation *signatureWidgetAnnotation = (CPDFSignatureWidgetAnnotation *)activeAnnotation;
|
|
|
+ CPDFSignatureWidgetDraggedType draggedIndex = -1;
|
|
|
+ if ((resizeHandle & CMaxXEdgeMask) && (resizeHandle & CMinYEdgeMask)) {
|
|
|
+ draggedIndex = 2;
|
|
|
+ } else if ((resizeHandle & CMaxXEdgeMask) && (resizeHandle & CMaxYEdgeMask)) {
|
|
|
+ draggedIndex = 4;
|
|
|
+ } else if ((resizeHandle & CMinXEdgeMask) && (resizeHandle & CMaxYEdgeMask)) {
|
|
|
+ draggedIndex = 6;
|
|
|
+ } else if ((resizeHandle & CMinXEdgeMask) && (resizeHandle & CMinYEdgeMask)) {
|
|
|
+ draggedIndex = 0;
|
|
|
+ } else if (resizeHandle & CMinXEdgeMask) {
|
|
|
+ draggedIndex = 7;
|
|
|
+ } else if (resizeHandle & CMaxXEdgeMask) {
|
|
|
+ draggedIndex = 3;
|
|
|
+ } else if (resizeHandle & CMinYEdgeMask) {
|
|
|
+ draggedIndex = 1;
|
|
|
+ } else if (resizeHandle & CMaxYEdgeMask) {
|
|
|
+ draggedIndex = 5;
|
|
|
+ }
|
|
|
+ if (draggedIndex == -1) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ [signatureWidgetAnnotation dragSignatureWidgetAnnotationWithCurrentPagePoint:currentPagePoint draggedIndex:draggedIndex];
|
|
|
} else {
|
|
|
[activeAnnotation setBounds:NSIntegralRect(newBounds)];
|
|
|
}
|
|
@@ -4773,6 +4845,15 @@ static inline CPDFAreaOfInterest CAreaOfInterestForResizeHandle(CRectEdges mask,
|
|
|
[polygonAnnotation setMeasureInfo:me];
|
|
|
}
|
|
|
}
|
|
|
+ } else if ([activeAnnotation isKindOfClass:[CPDFStampAnnotation class]]) {
|
|
|
+ CPDFStampAnnotation *stampAnnotation = (CPDFStampAnnotation *)activeAnnotation;
|
|
|
+ [stampAnnotation moveStampAnnotationWithActivePage:stampAnnotation.page offset:offset];
|
|
|
+ } else if ([activeAnnotation isKindOfClass:[CPDFSignatureAnnotation class]]) {
|
|
|
+ CPDFSignatureAnnotation *signatureAnnotation = (CPDFSignatureAnnotation *)activeAnnotation;
|
|
|
+ [signatureAnnotation moveSignatureAnnotationWithActivePage:signatureAnnotation.page offset:offset];
|
|
|
+ } else if ([activeAnnotation isKindOfClass:[CPDFSignatureWidgetAnnotation class]]) {
|
|
|
+ CPDFSignatureWidgetAnnotation *signatureWidgetAnnotation = (CPDFSignatureWidgetAnnotation *)activeAnnotation;
|
|
|
+ [signatureWidgetAnnotation moveSignatureWidgetAnnotationWithActivePage:signatureWidgetAnnotation.page offset:offset];
|
|
|
} else {
|
|
|
[activeAnnotation setBounds:newBounds];
|
|
|
}
|