Skip to content
导航

VectorPath

路径对象, 可使用 VectorPathString 字符串代替

ts
interface VectorPath {
  rule?: WindingRule
  data: IPathData | IPathString
}

WindingRule

ts
type WindingRule: = "evenodd" | "nonzero"

IPathString

SVG 字符串路径数据, 可通过 PathConvert.parse() 转换 IPathString 为 IPathData

ts
const data = 'M 0 0 L 100 100 L 0 100 Z'

IPathCommandData

数字数组的路径数据, 可通过 PathCreator 创建 IPathCommandData

ts
const data = [1, 0, 0, 2, 100, 100, 2, 0, 100, 11] // M 0 0 L 100 100 L 0 100 Z

Released under the MIT License.