|
@@ -4,9 +4,6 @@ using ComPDFKit.PDFDocument.Action;
|
|
|
using ComPDFKit.PDFDocument;
|
|
|
using ComPDFKit.Tool.SettingParam;
|
|
|
using ComPDFKitViewer;
|
|
|
-using System;
|
|
|
-using System.Collections.Generic;
|
|
|
-using System.Linq;
|
|
|
using static ComPDFKit.PDFAnnotation.CTextAttribute.CFontNameHelper;
|
|
|
using static ComPDFKit.PDFAnnotation.CTextAttribute;
|
|
|
using ComPDFKit.Tool.Help;
|
|
@@ -535,8 +532,8 @@ namespace ComPDFKit.Tool
|
|
|
|
|
|
private void DefaultStampAnnot(CPDFAnnotation cPDFAnnotation, AnnotParam annotParam)
|
|
|
{
|
|
|
- CPDFStampAnnotation strikeoutAnnotation = (cPDFAnnotation as CPDFStampAnnotation);
|
|
|
- if (strikeoutAnnotation == null)
|
|
|
+ CPDFStampAnnotation stampAnnot = (cPDFAnnotation as CPDFStampAnnotation);
|
|
|
+ if (stampAnnot == null)
|
|
|
{
|
|
|
return;
|
|
|
}
|
|
@@ -545,7 +542,6 @@ namespace ComPDFKit.Tool
|
|
|
if (annotParam == null)
|
|
|
{
|
|
|
DefaultSettingParam defaultSettingParam = GetDefaultSettingParam();
|
|
|
-
|
|
|
stampParam = defaultSettingParam.StampParamDef;
|
|
|
}
|
|
|
else
|
|
@@ -562,7 +558,8 @@ namespace ComPDFKit.Tool
|
|
|
{
|
|
|
stampText = string.Empty;
|
|
|
}
|
|
|
- strikeoutAnnotation.SetStandardStamp(stampText, stampParam.Rotation);
|
|
|
+
|
|
|
+ stampAnnot.SetStandardStamp(stampText, stampParam.PageRotation);
|
|
|
}
|
|
|
break;
|
|
|
case C_STAMP_TYPE.IMAGE_STAMP:
|
|
@@ -574,12 +571,12 @@ namespace ComPDFKit.Tool
|
|
|
|
|
|
if (imageData != null && imageWidth > 0 && imageHeight > 0)
|
|
|
{
|
|
|
- strikeoutAnnotation.SetRect(new CRect(0, imageHeight, imageWidth, 0));
|
|
|
- strikeoutAnnotation.SetImageStamp(
|
|
|
+ stampAnnot.SetRect(new CRect(0, imageHeight, imageWidth, 0));
|
|
|
+ stampAnnot.SetImageStamp(
|
|
|
imageData,
|
|
|
imageWidth,
|
|
|
imageHeight,
|
|
|
- stampParam.Rotation);
|
|
|
+ stampParam.PageRotation);
|
|
|
}
|
|
|
}
|
|
|
break;
|
|
@@ -595,18 +592,19 @@ namespace ComPDFKit.Tool
|
|
|
{
|
|
|
stampText = string.Empty;
|
|
|
}
|
|
|
- strikeoutAnnotation.SetTextStamp(
|
|
|
+ stampAnnot.SetTextStamp(
|
|
|
stampText,
|
|
|
dateText,
|
|
|
stampParam.TextStampShape,
|
|
|
stampParam.TextStampColor,
|
|
|
- stampParam.Rotation);
|
|
|
+ stampParam.PageRotation);
|
|
|
}
|
|
|
break;
|
|
|
default:
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
+ stampAnnot.AnnotationRotator.SetRotation(stampParam.Rotation);
|
|
|
DefaultAnnot(cPDFAnnotation, stampParam);
|
|
|
}
|
|
|
|