Load colors from theme

This commit is contained in:
Devine Lu Linvega
2018-03-07 11:57:52 +13:00
parent fcbe3d4b74
commit 74e64f42e9
3 changed files with 33 additions and 18 deletions

View File

@@ -3,13 +3,20 @@ function Tool()
this.index = 0;
this.layers = [[],[],[]];
this.styles = [
{thickness:5,strokeLinecap:"round",strokeLinejoin:"round"},
{thickness:5,strokeLinecap:"round",strokeLinejoin:"round"},
{thickness:5,strokeLinecap:"round",strokeLinejoin:"round"}
{thickness:5,strokeLinecap:"round",strokeLinejoin:"round",color:"#f00"},
{thickness:5,strokeLinecap:"round",strokeLinejoin:"round",color:"#0f0"},
{thickness:5,strokeLinecap:"round",strokeLinejoin:"round",color:"#00f"}
];
this.verteces = [];
this.reqs = {line:2,arc_c:2,arc_r:2,bezier:3,close:0};
this.start = function()
{
this.styles[0].color = dotgrid.theme.active.f_high
this.styles[1].color = dotgrid.theme.active.f_med
this.styles[2].color = dotgrid.theme.active.f_low
}
this.reset = function()
{
this.layers = [[],[],[]];