Browse Source

Create CreateContour.bas

蘭雅sRGB 2 years ago
parent
commit
d38b135bc6
1 changed files with 21 additions and 0 deletions
  1. 21 0
      base/CreateContour.bas

+ 21 - 0
base/CreateContour.bas

@@ -0,0 +1,21 @@
+Sub TestMacro()
+  ActiveDocument.Unit = cdrMillimeter
+  Dim sh As Shape, shs As Shapes, cs As Shape
+  Set shs = ActiveSelection.Shapes
+  For Each sh In shs
+    Dim eff1 As Effect
+    Set eff1 = sh.CreateContour(cdrContourOutside, 5, 1, cdrDirectFountainFillBlend, CreateRGBColor(26, 22, 35), CreateCMYKColor(0, 0, 0, 100), CreateCMYKColor(0, 0, 0, 100), 0, 0, cdrContourSquareCap, cdrContourCornerMiteredOffsetBevel, 15#)
+    eff1.Contour.ContourGroup.Shapes(1).AddToSelection
+    eff1.Separate
+  Next sh
+
+    Dim OrigSelection As ShapeRange
+    Set OrigSelection = ActiveSelectionRange
+    Set sh = OrigSelection.CustomCommand("Boundary", "CreateBoundary")
+
+  ActiveSelection.Shapes.FindShapes(Query:="@Outline.Color=RGB(26, 22, 35)").CreateSelection
+  For Each sh In ActiveSelection.Shapes
+    sh.Delete
+  Next sh
+
+End Sub