|
@@ -474,12 +474,18 @@ namespace ComPDFKit.Tool
|
|
e.Square.Width / e.annotData.CurrentZoom,
|
|
e.Square.Width / e.annotData.CurrentZoom,
|
|
e.Square.Height / e.annotData.CurrentZoom
|
|
e.Square.Height / e.annotData.CurrentZoom
|
|
);
|
|
);
|
|
|
|
+
|
|
Rect rect = DpiHelper.StandardRectToPDFRect(rect1);
|
|
Rect rect = DpiHelper.StandardRectToPDFRect(rect1);
|
|
CRect cRect = new CRect((float)rect.Left, (float)rect.Bottom, (float)rect.Right, (float)rect.Top);
|
|
CRect cRect = new CRect((float)rect.Left, (float)rect.Bottom, (float)rect.Right, (float)rect.Top);
|
|
- e.annotData.Annot.SetRect(cRect);
|
|
|
|
if(e.annotData.AnnotType == C_ANNOTATION_TYPE.C_ANNOTATION_STAMP)
|
|
if(e.annotData.AnnotType == C_ANNOTATION_TYPE.C_ANNOTATION_STAMP)
|
|
- {
|
|
|
|
- (e.annotData.Annot as CPDFStampAnnotation).AnnotationRotator.SetRotation(-e.rotationAngle);
|
|
|
|
|
|
+ {
|
|
|
|
+ CPDFStampAnnotation stampAnnot = e.annotData.Annot as CPDFStampAnnotation;
|
|
|
|
+ stampAnnot.SetSourceRect(cRect);
|
|
|
|
+ stampAnnot.AnnotationRotator.SetRotation(e.rotationAngle);
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ e.annotData.Annot.SetRect(cRect);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1157,7 +1163,7 @@ namespace ComPDFKit.Tool
|
|
|
|
|
|
private void SaveCreateAnnotation(ref CPDFAnnotation annotation, ref MouseEventObject e)
|
|
private void SaveCreateAnnotation(ref CPDFAnnotation annotation, ref MouseEventObject e)
|
|
{
|
|
{
|
|
- if (annotation == null)
|
|
|
|
|
|
+ if (annotation == null || !annotation.IsValid())
|
|
{
|
|
{
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -2034,7 +2040,6 @@ namespace ComPDFKit.Tool
|
|
viewerTool.DrawMoveFrameSelect();
|
|
viewerTool.DrawMoveFrameSelect();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
if (cursor == Cursors.Arrow && createContentEditType == CPDFEditType.EditText)
|
|
if (cursor == Cursors.Arrow && createContentEditType == CPDFEditType.EditText)
|
|
@@ -2048,7 +2053,6 @@ namespace ComPDFKit.Tool
|
|
{
|
|
{
|
|
Cursor cursor = Cursors.Arrow;
|
|
Cursor cursor = Cursors.Arrow;
|
|
MultiSelectedRect multiSelectedRect = CommonHelper.FindVisualChild<MultiSelectedRect>(viewerTool.PDFViewer.GetViewForTag(viewerTool.MultiSelectedRectViewTag));
|
|
MultiSelectedRect multiSelectedRect = CommonHelper.FindVisualChild<MultiSelectedRect>(viewerTool.PDFViewer.GetViewForTag(viewerTool.MultiSelectedRectViewTag));
|
|
-
|
|
|
|
if (viewerTool.GetLastSelectedRect() != null)
|
|
if (viewerTool.GetLastSelectedRect() != null)
|
|
{
|
|
{
|
|
if (editSelected)
|
|
if (editSelected)
|