codeanticode / tablet

Tablet is a library for using pen tablets from Processing.
http://processing.andrescolubri.net/libraries/tablet/
Other
24 stars 2 forks source link

Problems when switching renderer to P2D or P3D #3

Closed nylki closed 10 years ago

nylki commented 10 years ago

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); }

nylki commented 10 years ago

Ok, this seems to be a problem with only processing 2.1. Compiling with processing 2.0.x works.

knupel commented 10 years ago

Same problem work with Processing 2.0.x not with Processing 2.1.

knupel commented 10 years ago

Same problem in P3D with processing 211, on mac OS 10.7.5 capture decran 2014-01-27 a 14 03 48

knupel commented 10 years ago

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 ?