From 5f73cb1d82b07a57c3dbd58d15171ab77473254e Mon Sep 17 00:00:00 2001 From: mattmcw Date: Wed, 24 Mar 2021 14:38:07 -0400 Subject: [PATCH] define line size --- stipple_gen.pde | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/stipple_gen.pde b/stipple_gen.pde index 6f2ac95..a5085b7 100644 --- a/stipple_gen.pde +++ b/stipple_gen.pde @@ -116,6 +116,7 @@ public class Config { public float gamma = 1.0; public boolean fill = false; + public float line = 1.0; public Config (String inputFile) { int index; @@ -282,6 +283,8 @@ public class Config { gamma = floatOrDie(name, val); case "fill" : fill = boolOrDie(name, val); + case "line" : + line = floatOrDie(name, val); } println("[" + source + "] " + name + "=" + val); } @@ -1289,7 +1292,6 @@ void draw () { scaledDimension = round((float) width / mainRatio); image(canvas, 0, (height - scaledDimension) / 2, width, scaledDimension); } - println(scaledDimension); } if (Generation != lastGeneration) { @@ -1373,14 +1375,14 @@ void draw () { float dotrad = (config.maxDotSize - v * dotScale) / 2; - float xTemp = SVGscale*p1.x + xOffset; - float yTemp = SVGscale*p1.y + yOffset; + float xTemp = SVGscale * p1.x + xOffset; + float yTemp = SVGscale * p1.y + yOffset; rowTemp = ""; // Typ: if (config.fill) { - hatchLines = fillCircle(xTemp, yTemp, dotrad, 45.0, config.maxDotSize); + hatchLines = fillCircle(xTemp, yTemp, dotrad, 45.0, config.line); if (hatchLines.size() > 0) { for (float[] linePoints : hatchLines) { rowTemp += "";