pakt27

#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 pakt27App : public AppBasic {
public:
void prepareSettings(Settings *settings);
void setup();
void draw();
cairo::SurfaceImage srfOff;
cairo::Context ctxOff;
int index;
float w, h;
int n;
};

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

void pakt27App::setup() {
srfOff= cairo::SurfaceImage(WIDTH, HEIGHT, false);
ctxOff= cairo::Context(srfOff);
n= 80;
index= 0;
w= getWindowWidth()*0.5f;
h= getWindowHeight()*0.5f;
}

void pakt27App::draw() {

cairo::Context ctx(cairo::createWindowSurface());
ctxOff.setSourceRgba(0, 0, 0, 0.2f);
ctxOff.paint();

for(int i= 0; i