Skip to content
导航

矢量 | Vector

矢量路径。

关键属性

paths: VectorPath[] | VectorPathString

多条 Path 路径的集合。

ts
const vector = new Vector({
  stroke: "rgb(50,205,121)",
  paths: [{
    rule: 'evenodd'
    data: 'M 0 0 L 100 100 L 0 100 Z'
  },
  {
    rule: 'evenodd'
    data: 'M 200 0 L 100 100 L 0 100 Z'
  }]
})

vector.paths = 'M 0 0 L 100 100 L 0 100 Z, evenodd(M 200 0 L 100 100 L 0 100 Z)'

Released under the MIT License.