Преглед на файлове

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

TangJinZhou преди 1 месец
родител
ревизия
4dfd7cbedb

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

@@ -912,7 +912,7 @@ namespace ComPDFKit.Controls.PDFControl
             rotateLeftMenu.Click += (o, p) =>
             rotateLeftMenu.Click += (o, p) =>
             {
             {
                 Rect oldRect = DataConversionForWPF.CRectConversionForRect(imageArea.GetFrame());
                 Rect oldRect = DataConversionForWPF.CRectConversionForRect(imageArea.GetFrame());
-                imageArea.Rotate(-90);
+                imageArea.Rotate(90);
                 pdfContentEditControl.RefreshThumb();
                 pdfContentEditControl.RefreshThumb();
                 UpdateEditArea(oldRect,imageArea);
                 UpdateEditArea(oldRect,imageArea);
             };
             };
@@ -923,7 +923,7 @@ namespace ComPDFKit.Controls.PDFControl
             rotateRightMenu.Click += (o, p) =>
             rotateRightMenu.Click += (o, p) =>
             {
             {
                     Rect oldRect = DataConversionForWPF.CRectConversionForRect(imageArea.GetFrame());
                     Rect oldRect = DataConversionForWPF.CRectConversionForRect(imageArea.GetFrame());
-                    imageArea.Rotate(90);
+                    imageArea.Rotate(-90);
                     pdfContentEditControl.RefreshThumb();
                     pdfContentEditControl.RefreshThumb();
                     UpdateEditArea(oldRect, imageArea);
                     UpdateEditArea(oldRect, imageArea);
             };
             };
@@ -1062,7 +1062,7 @@ namespace ComPDFKit.Controls.PDFControl
             rotateLeftMenu.Click += (o, p) =>
             rotateLeftMenu.Click += (o, p) =>
             {
             {
                 Rect oldRect = DataConversionForWPF.CRectConversionForRect(pathArea.GetFrame());
                 Rect oldRect = DataConversionForWPF.CRectConversionForRect(pathArea.GetFrame());
-                pathArea.Rotate(-90);
+                pathArea.Rotate(90);
                 UpdateEditArea(oldRect, pathArea);
                 UpdateEditArea(oldRect, pathArea);
             };
             };
             menu.Items.Add(rotateLeftMenu);
             menu.Items.Add(rotateLeftMenu);
@@ -1072,7 +1072,7 @@ namespace ComPDFKit.Controls.PDFControl
             rotateRightMenu.Click += (o, p) =>
             rotateRightMenu.Click += (o, p) =>
             {
             {
                 Rect oldRect = DataConversionForWPF.CRectConversionForRect(pathArea.GetFrame());
                 Rect oldRect = DataConversionForWPF.CRectConversionForRect(pathArea.GetFrame());
-                pathArea.Rotate(90);
+                pathArea.Rotate(-90);
                 UpdateEditArea(oldRect, pathArea);
                 UpdateEditArea(oldRect, pathArea);
             };
             };
             menu.Items.Add(rotateRightMenu);
             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)
         private void RotateLeftBtn_Click(object sender, RoutedEventArgs e)
         {
         {
-            RotationChanged?.Invoke(this, -90);
+            RotationChanged?.Invoke(this, 90);
         }
         }
 
 
         private void RotateRightBtn_Click(object sender, RoutedEventArgs e)
         private void RotateRightBtn_Click(object sender, RoutedEventArgs e)
         {
         {
-            RotationChanged?.Invoke(this, 90);
+            RotationChanged?.Invoke(this, -90);
         }
         }
 
 
         #endregion 
         #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)
             if (ToolView.CurrentEditAreaObject() != null)
             {
             {
                 Rect oldRect = DataConversionForWPF.CRectConversionForRect(pathAreas[0].GetFrame());
                 Rect oldRect = DataConversionForWPF.CRectConversionForRect(pathAreas[0].GetFrame());
-                if (pathAreas[0].Rotate((int)-e))
+                if (pathAreas[0].Rotate((int)e))
                 {
                 {
                     PDFEditHistory editHistory = new PDFEditHistory();
                     PDFEditHistory editHistory = new PDFEditHistory();
                     editHistory.EditPage = editPage;
                     editHistory.EditPage = editPage;
@@ -356,7 +356,7 @@ namespace ComPDFKit.Controls.Edit
                 GroupHistory groupHistory = new GroupHistory();
                 GroupHistory groupHistory = new GroupHistory();
                 foreach (CPDFEditPathArea pathArea in pathAreas)
                 foreach (CPDFEditPathArea pathArea in pathAreas)
                 {
                 {
-                    if (pathArea.Rotate((int)-e))
+                    if (pathArea.Rotate((int)e))
                     {
                     {
                         PDFEditHistory editHistory = new PDFEditHistory();
                         PDFEditHistory editHistory = new PDFEditHistory();
                         editHistory.EditPage = editPage;
                         editHistory.EditPage = editPage;