class Point { int x; int y; Point(int x, int y) { this.x = x; this.y = y; } Point(Point p) { x = p.x; y = p.y; } } void affichePoint(Point p) { println(p.x, p.y); } void setup() { size(1000,500); background(255); frameRate(24); } Point pCur; Point pPrev; void draw() { pCur = new Point(mouseX, mouseY); affichePoint(pCur); if (pPrev != null) { line(pCur.x,pCur.y,pPrev.x,pPrev.y); } pPrev = new Point(pCur); }