示例#1
0
        public void run()
        {
            while (!that.__stop)
            {
                that.shift++;
                Plasma.shiftPlasma(that.shift);

                that.buffer.newPixels();
                that.paint(that.getGraphics());

                Thread.yield();
            }
        }
示例#2
0
        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);
        }