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

Question: Is it possible to generate fully scalable (SVG) diagrams? #61

Open
dobladez opened this issue Jul 9, 2023 · 1 comment
Open
Assignees
Labels
enhancement New feature or request

Comments

@dobladez
Copy link

dobladez commented Jul 9, 2023

Just found this project, it's great, thanks!. Question:

If I output SVG diagrams (plantuml -Tsvg), the resulting .svg includes rasterized version of the AWS icons. Is it possible to generate a fully-vectorized diagram?

Thanks!

@hakanson
Copy link
Contributor

Fully vectorized (SVG in SVG) would be nicer, but I ran into issues like SVG Sprite shows up in PNG output, but SVG Image doesn't. #1199. That meant using PNG worked for either output format, but, using SVG only worked for SVG output. Therefore, we implemented PNG images that would work everywhere.

@dobladez - can you go +1 and comment on that issue? Maybe we can get that fixed.

Similar to how I implemented "dark mode" using !$AWS_DARK = true to conditionally include the right icon, it is technically possible to have a flag that forces SVG and include both the <img data:image/png;base64,... and <img data:image/svg+xml;base64, in the .puml files. However, I'm not sure of the file size implications there.

Note - I used base64 images instead of URLs so library wouldn't require PlantUML to have network access, but you should be able to use the creole img syntax to include self hosted .svg files if you want to do some testing. Similar to this which access the Lambda PNG file.

participant "<img:https://raw.githubusercontent.com/awslabs/aws-icons-for-plantuml/v16.0/dist/Compute/Lambda.png> \nLambda" as lambda

PNG

SVG Scale Issue

SVG

SVG Scale Issue

@hakanson hakanson added the enhancement New feature or request label Jul 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants