Added full arc tools
This commit is contained in:
@@ -54,6 +54,12 @@ function Generator (layer, style) {
|
||||
} else if (type == 'arc_r') {
|
||||
let clock = mirror > 0 ? '0,1' : '0,0'
|
||||
html += next ? `A${Math.abs(next.x - vertex.x)},${Math.abs(next.y - vertex.y)} 0 ${clock} ${next.x},${next.y} ` : ''
|
||||
} else if (type == 'arc_c_full') {
|
||||
let clock = mirror > 0 ? '1,0' : '1,1'
|
||||
html += next ? `A${Math.abs(next.x - vertex.x)},${Math.abs(next.y - vertex.y)} 0 ${clock} ${next.x},${next.y} ` : ''
|
||||
} else if (type == 'arc_r_full') {
|
||||
let clock = mirror > 0 ? '1,1' : '1,0'
|
||||
html += next ? `A${Math.abs(next.x - vertex.x)},${Math.abs(next.y - vertex.y)} 0 ${clock} ${next.x},${next.y} ` : ''
|
||||
} else if (type == 'bezier') {
|
||||
html += next && after_next ? `Q${next.x},${next.y} ${after_next.x},${after_next.y} ` : ''
|
||||
skip = 1
|
||||
|
||||
@@ -10,7 +10,7 @@ DOTGRID.Tool = function () {
|
||||
{ thickness: 10, strokeLinecap: 'round', strokeLinejoin: 'round', color: '#00f', fill: 'none', mirror_style: 0 }
|
||||
]
|
||||
this.vertices = []
|
||||
this.reqs = { line: 2, arc_c: 2, arc_r: 2, bezier: 3, close: 0 }
|
||||
this.reqs = { line: 2, arc_c: 2, arc_r: 2, arc_c_full: 2, arc_r_full: 2, bezier: 3, close: 0 }
|
||||
|
||||
this.start = function () {
|
||||
this.styles[0].color = DOTGRID.theme.active.f_high
|
||||
|
||||
Reference in New Issue
Block a user