pakt00

#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 pakt00App : public AppBasic {
public:
void prepareSettings(Settings *settings);
void setup();
void draw();
int index;
};

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

void pakt00App::setup() {
index= 0;
}

void pakt00App::draw() {

float x= getWindowCenter().x;
float y= getWindowCenter().y;
float w= getWindowWidth()*0.25;
float h= getWindowHeight()*0.25;

cairo::Context ctx( cairo::createWindowSurface() );

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

ctx.setLineWidth(1);

ctx.setSourceRgba(1, 1, 0.8, 1);
for(int i= 0; i<120; i++) {
float start= sin((index+i)*0.006+i)*M_PI;
float end= sin((index+i)*0.0123+i)*2*M_PI;
if(start