Moving path tools into Generator()

This commit is contained in:
Devine Lu Linvega
2018-05-10 09:56:55 +12:00
parent d4e197f08e
commit b24475662a
3 changed files with 82 additions and 5 deletions

View File

@@ -109,15 +109,16 @@ function Guide()
this.draw_paths = function()
{
var paths = dotgrid.tool.paths_mod({x:15,y:15},scale)
this.draw_path(paths,0)
var path = new Generator(dotgrid.tool.layer()).toString({x:15,y:15},scale)
var style = dotgrid.tool.style()
this.draw_path(path,style)
}
this.draw_path = function(paths,id)
this.draw_path = function(path,style)
{
var style = dotgrid.tool.styles[id]
var ctx = this.el.getContext('2d');
var p = new Path2D(paths[id]);
var p = new Path2D(path);
ctx.strokeStyle = style.color;
ctx.lineWidth = style.thickness * scale;