From 0178ece9e302bc25598d1bb514cebe906b4a92bf Mon Sep 17 00:00:00 2001 From: Jochen Derwae Date: Tue, 12 Nov 2019 16:41:55 +0100 Subject: [PATCH] Updated imageToString() to remove the now deprecated orientation parameter Updated outputString() to deal with the updated imageToString() --- index.html | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/index.html b/index.html index 48639f0..74b970e 100644 --- a/index.html +++ b/index.html @@ -926,7 +926,7 @@ } } - function imageToString(orientation, image){ + function imageToString(image){ // extract raw image data var ctx = image.ctx; var canvas = image.canvas; @@ -955,7 +955,7 @@ case "arduino": { images.each(function(image) { - code = imageToString(settings["drawMode"], image); + code = imageToString(image); // Trim whitespace from end and remove trailing comma code = code.replace(/,\s*$/,""); @@ -964,7 +964,6 @@ var variableCount = images.length() > 1 ? count++ : ""; var comment = "// '" + image.glyph + "', "+image.canvas.width+"x"+image.canvas.height+"px\n"; - //uint16_t - unsigned char code = comment + "const " + getType() + " " + getIdentifier() + variableCount + @@ -979,7 +978,7 @@ case "arduino_single": { var comment = ""; images.each(function(image) { - code = imageToString(settings["drawMode"], image); + code = imageToString(image); code = "\t" + code.split("\n").join("\n\t") + "\n"; comment = "\t// '" + image.glyph + ", " + image.canvas.width+"x"+image.canvas.height+"px\n"; output_string += comment + code; @@ -998,7 +997,7 @@ var comment = ""; var useGlyphs = 0; images.each(function(image) { - code = imageToString(settings["drawMode"], image); + code = imageToString(image); code = "\t" + code.split("\n").join("\n\t") + "\n"; comment = "\t// '" + image.glyph + ", " + image.canvas.width+"x"+image.canvas.height+"px\n"; output_string += comment + code; @@ -1053,7 +1052,7 @@ } default: { // plain images.each(function(image) { - code = imageToString(settings["drawMode"], image); + code = imageToString(image); var comment = image.glyph ? ("// '" + image.glyph + "', " + image.canvas.width+"x"+image.canvas.height+"px\n") : ""; if(image.img != images.first().img) comment = "\n" + comment; code = comment + code;