Embedding processing without threading?
in
Integration and Hardware
•
1 year ago
Hello
I would like to embed processing into a java application. I want to use processing core api to draw charts and therefore the threading and framing is not necessary. I would like to do something like this:
PApplet pa = new PApplet();
pa.size(200,100);
pa.background(0,0,0);
pa.stroke(255, 255, 255);
pa.line(0, 0, 200, 100);
pa.line(200, 100, 0, 0);
pa.handleDraw();
pa.saveAsJpg();
pa.dispose();
How do I have to adapt the PApplet code to fit my needs? I have tried simply deactivating the main while loop but I am just getting an empty sketch without any lines.
Thanks
Chris
1