Open matiasw opened 7 months ago
Ah right, after refreshing my memory about another SVG issue I had: https://github.com/benfry/processing4/issues/803
...I got it to work by moving the ellipseMode
call between the beginRecord
and endRecord
.
So, is this just user error on my part? I thought the SVG exporter is supposed to always match what gets drawn to the screen, but maybe I've got that wrong, and it actually just dumps whatever drawing happens between the begin and end calls? In that case, you may close the issue.
When exporting a sketch as SVG from Processing 4.3 with
processing.svg
, the result is not what the sketch renders in Processing.Expected Behavior
I expect the exported SVG to match what is drawn by the internal Processing graphics renderer, which is this:
Current Behavior
Instead of matching the output from the sketch, what gets exported into the SVG is this:
Steps to Reproduce
setup
anddraw
), which is here:void draw() { beginRecord(SVG, "flower_of_life_field.svg"); int R = 100; Circle c1 = new Circle(new PVector(SCREENWIDTH/2, SCREENHEIGHT/2), R); Circle c2 = new Circle(new PVector(c1.center.x + R, c1.center.y), R); Circle[] circles = new Circle[2]; circles[0] = c1; circles[1] = c2; circles = iterate(circles, 7); for (Circle c: circles) { //println("Draw ellipses at ", c.center.x, c.center.y); circle(c.center.x, c.center.y, c.r); } endRecord(); }