Ver Fonte

ComPDFKit.Demo(win) - 云朵线示意图

liuaoran há 2 semanas atrás
pai
commit
c2cf3fce04

Diff do ficheiro suprimidas por serem muito extensas
+ 7 - 1
Demo/Examples/Compdfkit.Controls/Annotation/CPDFAnnotationPreviewerControl.xaml


+ 6 - 20
Demo/Examples/Compdfkit.Controls/Annotation/CPDFAnnotationPreviewerControl.xaml.cs

@@ -152,6 +152,12 @@ namespace ComPDFKit.Controls.PDFControl
             SharpPath.StrokeThickness = freehandData.Thickness;
         }
 
+        public void DrawCloudPreview()
+        { 
+            CollapsedAll();
+            gdPolygon.Visibility = Visibility.Visible;
+        }
+
         public void DrawNotePreview(CPDFAnnotationData annotationData)
         {
             CollapsedAll();
@@ -182,26 +188,6 @@ namespace ComPDFKit.Controls.PDFControl
             FreeText.Opacity = freeTextData.Opacity;
         }
 
-        public void DrawPolygonPreview(CPDFAnnotationData polygonData)
-        {
-            CollapsedAll();
-            GdPolygon.Visibility = Visibility.Visible;
-            Point startPoint = new Point(20, 70);
-            Point endPoint = new Point(200, 70);
-
-            Path cloudPath = DrawCloudLine(
-               startPoint,             // 起始点
-               endPoint,           // 终点
-                5,                          // 半径
-                120,                          // 角度
-                Brushes.Blue,                // 颜色
-                2.0,                          // 线宽
-                false
-            );
-
-            GdPolygon.Children.Add(cloudPath);
-        }
-
         private Path DrawCloudLine(Point startPoint, Point endPoint, double radius, double angle, Brush strokeColor, double strokeThickness, bool isUpward)
         {
             double lineLength = Math.Sqrt(Math.Pow(endPoint.X - startPoint.X, 2) + Math.Pow(endPoint.Y - startPoint.Y, 2));

+ 1 - 1
Demo/Examples/Compdfkit.Controls/Annotation/PDFAnnotationData/CPDFAnnotationData.cs

@@ -179,7 +179,7 @@ namespace ComPDFKit.Controls.Data
             get;
             set;
         } = new CPDFBorderEffector(C_BORDER_TYPE.C_BORDER_TYPE_Cloud, C_BORDER_INTENSITY.C_INTENSITY_ONE);
-        public C_BORDER_STYLE BorderStyle = C_BORDER_STYLE.BS_SOLID;
+        public C_BORDER_STYLE BorderStyle = C_BORDER_STYLE.BS_SOLID; 
         public double Opacity = 1;
         public int Thickness = 1;
         public bool IsMeasured = false;