define line size
This commit is contained in:
parent
3c4c66af96
commit
5f73cb1d82
|
@ -116,6 +116,7 @@ public class Config {
|
||||||
public float gamma = 1.0;
|
public float gamma = 1.0;
|
||||||
|
|
||||||
public boolean fill = false;
|
public boolean fill = false;
|
||||||
|
public float line = 1.0;
|
||||||
|
|
||||||
public Config (String inputFile) {
|
public Config (String inputFile) {
|
||||||
int index;
|
int index;
|
||||||
|
@ -282,6 +283,8 @@ public class Config {
|
||||||
gamma = floatOrDie(name, val);
|
gamma = floatOrDie(name, val);
|
||||||
case "fill" :
|
case "fill" :
|
||||||
fill = boolOrDie(name, val);
|
fill = boolOrDie(name, val);
|
||||||
|
case "line" :
|
||||||
|
line = floatOrDie(name, val);
|
||||||
}
|
}
|
||||||
println("[" + source + "] " + name + "=" + val);
|
println("[" + source + "] " + name + "=" + val);
|
||||||
}
|
}
|
||||||
|
@ -1289,7 +1292,6 @@ void draw () {
|
||||||
scaledDimension = round((float) width / mainRatio);
|
scaledDimension = round((float) width / mainRatio);
|
||||||
image(canvas, 0, (height - scaledDimension) / 2, width, scaledDimension);
|
image(canvas, 0, (height - scaledDimension) / 2, width, scaledDimension);
|
||||||
}
|
}
|
||||||
println(scaledDimension);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Generation != lastGeneration) {
|
if (Generation != lastGeneration) {
|
||||||
|
@ -1380,7 +1382,7 @@ void draw () {
|
||||||
"\" style=\"fill:none;stroke:black;stroke-width:1;\"/>";
|
"\" style=\"fill:none;stroke:black;stroke-width:1;\"/>";
|
||||||
// Typ: <circle cx="1600" cy="450" r="3" style="fill:none;stroke:black;stroke-width:2;"/>
|
// Typ: <circle cx="1600" cy="450" r="3" style="fill:none;stroke:black;stroke-width:2;"/>
|
||||||
if (config.fill) {
|
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) {
|
if (hatchLines.size() > 0) {
|
||||||
for (float[] linePoints : hatchLines) {
|
for (float[] linePoints : hatchLines) {
|
||||||
rowTemp += "<line x1=\"" + linePoints[0] + "\" y1=\"" + linePoints[1] + "\" x2=\"" + linePoints[2] + "\" y2=\"" + linePoints[3] + "\" style=\"fill:none;stroke:black;stroke-width:1;\"/>";
|
rowTemp += "<line x1=\"" + linePoints[0] + "\" y1=\"" + linePoints[1] + "\" x2=\"" + linePoints[2] + "\" y2=\"" + linePoints[3] + "\" style=\"fill:none;stroke:black;stroke-width:1;\"/>";
|
||||||
|
|
Loading…
Reference in New Issue