Path.Line
.
Path
例如
路径.行
缺少。
所以你可以做以下几点:
var x = new paper.Path.Rectangle({
from: [100, 100],
to: [120, 200],
fillColor: 'red',
strokeWidth: 1
});
var y = x.clone().rotate(90).set({ fillColor: 'blue' })
// Unite x/y to get a single path.
var cross = y.unite(x)
// Remove x,y we no longer need them, we got the cross.
x.remove()
y.remove()
var hole = new paper.Path.Circle({
center:[110, 150],
radius: 6,
strokeColor: 'red',
fillColor: 'red'
})
// Subtract (instead of exclude), to "punch through".
var drilled = cross.subtract(hole)
// Remove hole/cross, we no longer need them.
hole.remove()
cross.remove()
console.log(drilled)
这里有一个
Sketch
.
团结
减去
从他们的洞,只记得使用封闭
s。