Closed nylki closed 10 years ago
Ok, this seems to be a problem with only processing 2.1. Compiling with processing 2.0.x works.
Same problem work with Processing 2.0.x not with Processing 2.1.
Same problem in P3D with processing 211, on mac OS 10.7.5
I think you fixe something, so I try to download the zip but that's don't work, there is something to do before use the fixed library ?
I get java.lang.NoSuchFieldError.canvas errors on compile, when using P2D or P3D.
the code:
import codeanticode.tablet.*;
Tablet tablet; PGraphics drawingLayer, infoLayer;
void setup() { size(640, 480, P2D); drawingLayer = createGraphics(width, height, P2D); infoLayer = createGraphics(width, height, P2D); tablet = new Tablet(this);
drawingLayer.beginDraw(); drawingLayer.background(0); drawingLayer.endDraw();
infoLayer.beginDraw(); infoLayer.background(0,0,0,0); infoLayer.endDraw(); stroke(255);
noCursor(); }
void draw() { if (mousePressed) { drawingLayer.beginDraw(); drawingLayer.strokeWeight(30 * tablet.getPressure()); drawingLayer.stroke(255); drawingLayer.line(pmouseX, pmouseY, mouseX, mouseY);
drawingLayer.endDraw(); } else { infoLayer.beginDraw(); infoLayer.background(0,0,0, 0.0); infoLayer.stroke(255, 0, 0, 80); infoLayer.strokeWeight(3); infoLayer.noFill(); infoLayer.ellipse(mouseX, mouseY, 20, 20); infoLayer.endDraw(); } image(drawingLayer,0,0); image(infoLayer, 0, 0); }