Draw layer shape as dashed outline with handles when acting as mask
This commit is contained in:
parent
7a93075312
commit
dd71a820a3
@ -37,6 +37,7 @@ function Renderer (client) {
|
|||||||
this.drawRulers()
|
this.drawRulers()
|
||||||
this.drawRender(render) //
|
this.drawRender(render) //
|
||||||
this.drawVertices()
|
this.drawVertices()
|
||||||
|
this.drawMaskPaths()
|
||||||
this.drawHandles()
|
this.drawHandles()
|
||||||
this.drawTranslation()
|
this.drawTranslation()
|
||||||
this.drawCursor()
|
this.drawCursor()
|
||||||
@ -102,6 +103,26 @@ function Renderer (client) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.drawMaskPaths = function () {
|
||||||
|
if (client.tool.style().mask) {
|
||||||
|
for (const part of client.tool.layer()) {
|
||||||
|
for (const vertex of part['vertices']) {
|
||||||
|
this.drawVertex(vertex)
|
||||||
|
this.drawCursor(vertex, client.tool.style().thickness)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const path = new Generator(client.tool.layer(), client.tool.style()).toString({ x: 0, y: 0 }, 2)
|
||||||
|
const style = {
|
||||||
|
color: client.theme.active.f_med,
|
||||||
|
thickness: 2,
|
||||||
|
strokeLinecap: 'round',
|
||||||
|
strokeLinejoin: 'round',
|
||||||
|
strokeLineDash: [5, 15]
|
||||||
|
}
|
||||||
|
this.drawPath(path, style)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this.drawGrid = function () {
|
this.drawGrid = function () {
|
||||||
if (!this.showExtras) { return }
|
if (!this.showExtras) { return }
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user