We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I'm trying to use the new SVG export feature. This is the test
import processing.svg.*;
void setup() { size(400, 400); beginRecord(SVG, "everything.svg"); }
void draw() { ellipse(mouseX, mouseY, 10, 10); }
void mousePressed() { endRecord(); exit(); }
It should produce a number of circles, but only produces a single circle. I've tried running it in PDF mode (changing SVG to PDF in the above) and it produces the correct result. If i change the draw() section to
ellipse(10,10,20,20); ellipse(20,20,20,20); ellipse(30,30,20,20);
it produces the three ellipses properly, so, the problem appears to occur in the handing of the mouseX/Y.
I'm a software developer new to Processing and looking for suggestions on how to debug this. Since i'm new to Processing, any help will be gratefully received.
Also, as a secondary issue, i would like to learn how to build/develop Processing so that i might contribute bug fixing. Any pointers to the process would be appreciated.
Answers
I've tried it once a long time ago in Processing 1.5.1.
I remember that I used beginRecord() inside draw().
Never seen it in setup() before. But it's exactly the example shown in the reference:
https://Processing.org/reference/beginRecord_.html
Perhaps you should take a look at some old forum threads about it:
https://forum.Processing.org/two/discussions/tagged?Tag=beginrecord()
Thanks for the help.