pakt01

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

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

void pakt01App::setup() {
index= 0;
n= 75;
}

void pakt01App::draw() {

float x= getWindowCenter().x;
float y= getWindowCenter().y;
float w= getWindowWidth()*0.25;
float h= getWindowHeight()*0.25;
float yellow= sin(index*0.0005)*0.3+0.65;

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

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

//double dashes[]= {sin(index*0.0023)*50.0+51, cos(index*0.0023)*50.0+51};
//ctx.setDash(dashes, 2, 0);

for(int i= 0; i