Sfoglia il codice sorgente

ComPDFKit.Demo(win) - 调整图片和Path编辑旋转角度逆时针为正向

TangJinZhou 1 mese fa
parent
commit
4dfd7cbedb

+ 4 - 4
Demo/Examples/Compdfkit.Controls/Edit/ContentEditCOntrol/ContentEditControl.xaml.cs

@@ -912,7 +912,7 @@ namespace ComPDFKit.Controls.PDFControl
             rotateLeftMenu.Click += (o, p) =>
             {
                 Rect oldRect = DataConversionForWPF.CRectConversionForRect(imageArea.GetFrame());
-                imageArea.Rotate(-90);
+                imageArea.Rotate(90);
                 pdfContentEditControl.RefreshThumb();
                 UpdateEditArea(oldRect,imageArea);
             };
@@ -923,7 +923,7 @@ namespace ComPDFKit.Controls.PDFControl
             rotateRightMenu.Click += (o, p) =>
             {
                     Rect oldRect = DataConversionForWPF.CRectConversionForRect(imageArea.GetFrame());
-                    imageArea.Rotate(90);
+                    imageArea.Rotate(-90);
                     pdfContentEditControl.RefreshThumb();
                     UpdateEditArea(oldRect, imageArea);
             };
@@ -1062,7 +1062,7 @@ namespace ComPDFKit.Controls.PDFControl
             rotateLeftMenu.Click += (o, p) =>
             {
                 Rect oldRect = DataConversionForWPF.CRectConversionForRect(pathArea.GetFrame());
-                pathArea.Rotate(-90);
+                pathArea.Rotate(90);
                 UpdateEditArea(oldRect, pathArea);
             };
             menu.Items.Add(rotateLeftMenu);
@@ -1072,7 +1072,7 @@ namespace ComPDFKit.Controls.PDFControl
             rotateRightMenu.Click += (o, p) =>
             {
                 Rect oldRect = DataConversionForWPF.CRectConversionForRect(pathArea.GetFrame());
-                pathArea.Rotate(90);
+                pathArea.Rotate(-90);
                 UpdateEditArea(oldRect, pathArea);
             };
             menu.Items.Add(rotateRightMenu);

+ 2 - 2
Demo/Examples/Compdfkit.Controls/Edit/PDFImageEdit/PDFImageUI/CPDFImageRotateUI.xaml.cs

@@ -31,12 +31,12 @@ namespace ComPDFKit.Controls.Edit
 
         private void RotateLeftBtn_Click(object sender, RoutedEventArgs e)
         {
-            RotationChanged?.Invoke(this, -90);
+            RotationChanged?.Invoke(this, 90);
         }
 
         private void RotateRightBtn_Click(object sender, RoutedEventArgs e)
         {
-            RotationChanged?.Invoke(this, 90);
+            RotationChanged?.Invoke(this, -90);
         }
 
         #endregion 

+ 2 - 2
Demo/Examples/Compdfkit.Controls/Edit/PDFPathEdit/PDFPathEditControl/PDFPathEditControl.xaml.cs

@@ -342,7 +342,7 @@ namespace ComPDFKit.Controls.Edit
             if (ToolView.CurrentEditAreaObject() != null)
             {
                 Rect oldRect = DataConversionForWPF.CRectConversionForRect(pathAreas[0].GetFrame());
-                if (pathAreas[0].Rotate((int)-e))
+                if (pathAreas[0].Rotate((int)e))
                 {
                     PDFEditHistory editHistory = new PDFEditHistory();
                     editHistory.EditPage = editPage;
@@ -356,7 +356,7 @@ namespace ComPDFKit.Controls.Edit
                 GroupHistory groupHistory = new GroupHistory();
                 foreach (CPDFEditPathArea pathArea in pathAreas)
                 {
-                    if (pathArea.Rotate((int)-e))
+                    if (pathArea.Rotate((int)e))
                     {
                         PDFEditHistory editHistory = new PDFEditHistory();
                         editHistory.EditPage = editPage;