Resolved this by compressing header.txt into a single line and adding it as a hardcoded variable String[] header, which mimics the output of the file read happening later in the script. Resolves issue #1
This commit is contained in:
parent
61a5ef3d40
commit
fb853e6480
|
@ -359,6 +359,8 @@ PGraphics canvas;
|
|||
Vec2D[] particles;
|
||||
int[] particleRoute;
|
||||
|
||||
String[] header = {"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><!-- Created for Inkscape (http://www.inkscape.org/) --><svg xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:svg=\"http://www.w3.org/2000/svg\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:sodipodi=\"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd\" xmlns:inkscape=\"http://www.inkscape.org/namespaces/inkscape\" width=\"{{WIDTH}}\" height=\"{{HEIGHT}}\" id=\"svg2985\" version=\"1.1\" inkscape:version=\"0.48.1 r9760\"> <defs id=\"defs2987\" /> <sodipodi:namedview id=\"base\" pagecolor=\"#ffffff\" bordercolor=\"#666666\" borderopacity=\"1.0\" inkscape:pageopacity=\"0.0\" inkscape:pageshadow=\"2\" inkscape:zoom=\"0.35\" inkscape:cx=\"0\" inkscape:cy=\"0\" inkscape:document-units=\"px\" inkscape:current-layer=\"layer1\" showgrid=\"false\" /> <metadata id=\"metadata2990\"> <rdf:RDF> <cc:Work rdf:about=\"\"> <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" /> <dc:title /> </cc:Work> </rdf:RDF> </metadata> <g inkscape:label=\"Layer 1\" inkscape:groupmode=\"layer\" id=\"layer1\"> <g>"};
|
||||
|
||||
void LoadImageAndScale() {
|
||||
int tempx = 0;
|
||||
int tempy = 0;
|
||||
|
@ -1373,7 +1375,7 @@ void draw () {
|
|||
OptimizePlotPath();
|
||||
}
|
||||
StatusDisplay = "Saving SVG File";
|
||||
FileOutput = loadStrings("header.txt");
|
||||
FileOutput = header;
|
||||
String rowTemp;
|
||||
|
||||
for (i = 0; i < FileOutput.length; i++) {
|
||||
|
|
Loading…
Reference in New Issue