Ver código fonte

矩形蒙版item 测试

haojianlong 4 anos atrás
pai
commit
aa15f3678e
1 arquivos alterados com 9 adições e 7 exclusões
  1. 9 7
      docs/.vuepress/components/scene/items/polyline.vue

+ 9 - 7
docs/.vuepress/components/scene/items/polyline.vue

@@ -6,7 +6,8 @@
 
 <script>
 import { SGraphScene, SGraphView } from "@persagy-web/graph/lib";
-import { SItemStatus, SCircleCornerPolylineItem } from "@persagy-web/big/lib";
+import { SItemStatus, SCircleCornerPolylineItem, SMaskItem } from "@persagy-web/big/lib";
+import { SColor } from "@persagy-web/draw/lib";
 
 /**
  * 可编辑折线示例
@@ -46,13 +47,14 @@ export default {
             //     [300, 100],
             //     [200, 20]
             this.item.pointList = [
-                { x: 15000, y: 20000 },
-                { x: 20000, y: 20000 },
-                { x: 20000, y: 30000 },
-                { x: 30000, y: 10000 },
-                { x: 20000, y: 10000 },
+                { x: 150, y: 200 },
+                { x: 200, y: 200 },
+                { x: 200, y: 300 },
+                { x: 300, y: 100 },
+                { x: 200, y: 100 },
             ];
-            // this.item.generatePath();
+            // this.item = new SMaskItem(null, [{x:0, y: 0}, {x:100, y:100}]);
+            // this.item.fillColor = SColor.Yellow
             this.scene.addItem(this.item);
             this.scene.grabItem = this.item;
             this.view.update();