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

PlantUML diagrams lines misplaced #266

Closed
kohtala opened this issue Mar 26, 2020 · 3 comments
Closed

PlantUML diagrams lines misplaced #266

kohtala opened this issue Mar 26, 2020 · 3 comments
Labels

Comments

@kohtala
Copy link

kohtala commented Mar 26, 2020

I'm using PlantUML for diagramming.

Unfortunately some lines are misplaced in some diagrams.

I have CairoSVG 2.4.2 and did try pip install --upgrade https://github.com/Kozea/CairoSVG/archive/master.zip to see if commit 1b3d448 would have a fix. They worked the same.

Host is Ubuntu 18.04.4 LTS. Python 3.7.5. plantuml 1:1.2017.15-1, but I also tried agains svg produced by 1.2020.5 from the jar.

I get this:
deployment

I really need PDF, which looks much the same deployment.pdf

Other tools (this with rsvg-convert) produce this:
deployment-rsvg

The images were created with these plantuml and svg files:
deployment.zip

$ plantuml -tsvg deployment.plantuml
$ cairosvg -fpdf -o deployment.pdf deployment.svg
$ cairosvg -fpng -o deployment.png deployment.svg

Thanks. It looks promising. I did missinglinkelectronics/sphinxcontrib-svg2pdfconverter#7 to hopefully give it more visibility and use.

@liZe
Copy link
Member

liZe commented Mar 26, 2020

Hello, thanks for the bug report!

The bug is caused by the gaussian blur filter. This filter is supposed to move the background rectangle (+4, +4), to blur it and to blend the blur with the original rectangle. As CairoSVG doesn’t support complex filters (see #23), it just moves the rectangle.

A simple workaround is to remove the filter definition: you can remove the <defs> or the <filter> tag from the SVG file. Handling complex filters is almost impossible using Cairo (see Kozea/WeasyPrint#13), so you can’t expect a quick fix for CairoSVG 😒.

@liZe liZe added the bug label Mar 26, 2020
@kohtala
Copy link
Author

kohtala commented Mar 27, 2020

Thanks.

With your hint to shadows, I found PlantUML has directive

skinparam shadowing false

This removes the shadow and the result from cairosvg looks much better.

deployment

@kohtala kohtala closed this as completed Mar 29, 2020
@kohtala
Copy link
Author

kohtala commented Mar 29, 2020

I closed this as duplicate of #23. No point in keeping this open. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants