Pārlūkot izejas kodu

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

liyijie 3 mēneši atpakaļ
vecāks
revīzija
3d03cccd40

+ 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;