Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SVG export duplicate shapes #5914

Closed
ajvdmeij opened this issue Aug 20, 2019 · 3 comments
Closed

SVG export duplicate shapes #5914

ajvdmeij opened this issue Aug 20, 2019 · 3 comments

Comments

@ajvdmeij
Copy link

When I export an SVG-file from processing using startRecord and endRecord, it produces duplicate shapes in the SVG-file with slightly different attributes (fill and stroke). If you open the SVG-file in a vector program like InkScape, you don't see it because the shapes overlap but the file is twice the size necessary and if you plot it (I use an Axidraw), it plots the shape twice.

When I use the export with the size command (without beginRecord and endRecord) it works allright. However, I need the beginRecord method because I have to make multiple different SVG's.
proc_code
proc_svg

@tracerstar
Copy link

This looks like it's to do with how Processing draws fills and strokes separately.

In your draw loop, just above the line ellipse(100,100,20,20) try adding a noFill() or a noStroke() and see what happens to the output.

If you use noStroke(), the SVG exported has just the one circle exported, with a style of stroke:none on it. Similarly, using noFill() you get a circle with style fill:none;

@ajvdmeij
Copy link
Author

ajvdmeij commented Sep 4, 2019

That worked! Thanks a million!

@benfry benfry closed this as completed Sep 12, 2019
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants