Implemented PNG export

This commit is contained in:
Devine Lu Linvega
2017-11-10 08:47:06 +13:00
parent 2fde8ef16d
commit 86aaef5c81
5 changed files with 65 additions and 18 deletions

21
sources/scripts/guide.js Normal file
View File

@@ -0,0 +1,21 @@
function Guide()
{
this.el = document.createElement("div");
// Guide
this.el.id = "guide";
this.start = function()
{
// Markers
for (var x = dotgrid.grid_x; x >= 0; x--) {
for (var y = dotgrid.grid_y; y >= 0; y--) {
var marker = document.createElement("div");
marker.setAttribute("class",(x % dotgrid.block_x == 0 && y % dotgrid.block_y == 0 ? "marker bm" : "marker bl"));
marker.style.left = parseInt(x * dotgrid.grid_width + (dotgrid.grid_width/2)) +5;
marker.style.top = parseInt(y * dotgrid.grid_height + (dotgrid.grid_height/2)) +5;
this.el.appendChild(marker);
}
}
}
}