diff --git a/src/main/java/com/neophob/sematrix/output/gui/GeneratorGui.java b/src/main/java/com/neophob/sematrix/output/gui/GeneratorGui.java index 507bebb3..dd720c13 100644 --- a/src/main/java/com/neophob/sematrix/output/gui/GeneratorGui.java +++ b/src/main/java/com/neophob/sematrix/output/gui/GeneratorGui.java @@ -74,7 +74,7 @@ public class GeneratorGui extends PApplet { private static final Logger LOG = Logger.getLogger(GeneratorGui.class.getName()); /** The y. */ - private int x,y; + private int windowWidth,windowHeight; /** The p image. */ private PImage pImage=null; @@ -125,8 +125,8 @@ public class GeneratorGui extends PApplet { * @param targetYSize the target y size */ public GeneratorGui(int x, int y, int targetXSize, int targetYSize) { - this.x = x; - this.y = y+SELECTED_MARKER; + this.windowWidth = x; + this.windowHeight = y+SELECTED_MARKER+100; this.targetXSize = targetXSize; this.targetYSize = targetYSize; this.p5GuiYOffset = targetYSize + 80; @@ -141,8 +141,8 @@ public GeneratorGui(int x, int y, int targetXSize, int targetYSize) { * @see processing.core.PApplet#setup() */ public void setup() { - LOG.log(Level.INFO, "create internal buffer with size "+x+"/"+y); - size(x,y+100); + LOG.log(Level.INFO, "create internal buffer with size "+windowWidth+"/"+windowHeight); + size(windowWidth,windowHeight); noSmooth(); frameRate(Collector.getInstance().getFps()); background(0,0,0); @@ -593,24 +593,30 @@ public void draw() { } - /** * draw nice gradient at the end of the screen */ private void drawGradientBackground() { //there is an issue with this.height, it changes! - int ofs=this.width*(424-255);//(this.height-255); + + int ofs=windowWidth*(windowHeight-355); + //System.out.println(windowWidth+" "+windowHeight); + + this.loadPixels(); + try { + for (int yy=0; yy<255; yy++) { + int pink = color(yy/2, 128); + for (int xx=0; xx