Browse Source

Merge branch 'compdfkit_demo_win_dev' of http://git.kdan.cc:8865/Others/kmpdfkit_demo into compdfkit_demo_win_dev

liyijie 3 months ago
parent
commit
3d03cccd40
1 changed files with 10 additions and 0 deletions
  1. 10 0
      Demo/Examples/ComPDFKit.Tool/DrawTool/CreateAnnotTool.cs

+ 10 - 0
Demo/Examples/ComPDFKit.Tool/DrawTool/CreateAnnotTool.cs

@@ -680,6 +680,16 @@ namespace ComPDFKit.Tool.DrawTool
                 lineSegment.IsSmoothJoin = true;
                 pathFigure.Segments.Add(lineSegment);
             }
+            if(annotLine.Dash!=null && annotLine.Dash.Length>0)
+            {
+                DashStyle dash = new DashStyle();
+                foreach (var offset in annotLine.Dash)
+                {
+                    dash.Dashes.Add(offset);
+                }
+                DrawPen.DashStyle = dash;
+                DrawPen.DashCap = PenLineCap.Flat;
+            }
             Rect checkRect = pageBound;
             RectangleGeometry rectGeometry = new RectangleGeometry();
             drawRect = rectGeometry.Rect = checkRect;