Re-Implement all paths drawing

This commit is contained in:
Devine Lu Linvega
2018-05-11 09:37:47 +12:00
parent b7e8b8e578
commit ff63f27b55
5 changed files with 45 additions and 20 deletions

View File

@@ -62,18 +62,24 @@ function Generator(layer)
return html
}
this.toString = function(offset = {x:0,y:0}, scale = 1)
this.convert = function(layer)
{
var s = ""
var layer = operate(this.layer,offset,scale)
for(id in layer){
var seg = layer[id];
s += `${this.render(seg)}`
}
return s.trim()
return s.trim();
}
this.toString = function(offset = {x:0,y:0}, scale = 1, mirror = dotgrid.tool.style().mirror_style)
{
var s = ""
var layer = operate(this.layer,offset,scale)
s += this.convert(layer)
return s
}
function copy(data){ return data ? JSON.parse(JSON.stringify(data)) : []; }