public void run() { while (!that.__stop) { that.shift++; Plasma.shiftPlasma(that.shift); that.buffer.newPixels(); that.paint(that.getGraphics()); Thread.yield(); } }
public override void init() { Plasma.generatePlasma(SinePlasma.DefaultWidth, SinePlasma.DefaultHeight); var pix = Plasma.shiftPlasma(0); this.buffer = new MemoryImageSource(SinePlasma.DefaultWidth, SinePlasma.DefaultHeight, pix, 0, SinePlasma.DefaultWidth); buffer.setAnimated(true); buffer.setFullBufferUpdates(true); new Thread(new SinePlasmaTimer { that = this }).start(); base.resize(SinePlasma.DefaultWidth, SinePlasma.DefaultHeight); this.img = this.createImage(buffer); }