pakt12

#include "cinder/app/AppBasic.h"
#include "cinder/cairo/Cairo.h"

using namespace ci;
using namespace ci::app;
using namespace std;

const int WIDTH= 640;
const int HEIGHT= 480;

class pakt12App : public AppBasic {
public:
void prepareSettings(Settings *settings);
void setup();
void draw();
int index;
float w, h;
float n;
cairo::Context ctx;
};

void pakt12App::prepareSettings(Settings *settings) {
settings->setWindowSize(WIDTH, HEIGHT);
settings->setResizable(false);
}

void pakt12App::setup() {
index= 0;
w= getWindowWidth();
h= getWindowHeight();
ctx= cairo::Context(cairo::createWindowSurface());
ctx.setFillRule(1);
ctx.setLineWidth(1.0f);
}

void pakt12App::draw() {

cairo::GradientRadial radialGrad(getWindowCenter(), 0, getWindowCenter(), getWindowWidth());
radialGrad.addColorStop(0, Color(0.3f, 0.3f, 0.3f));
radialGrad.addColorStop(1, Color(0.0f, 0.0f, 0.0f));
ctx.setSource(radialGrad);
ctx.paint();

n= sin(index/getFrameRate()*0.125)*150.0f+200.0f;
ctx.setSourceRgba(1.0f, 1.0f, 1.0f, 0.7f);
for(int i= 0; i