awslabs / aws-icons-for-plantuml

PlantUML sprites, macros, and other includes for Amazon Web Services services and resources
Other
887 stars 149 forks source link

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

Closed dobladez closed 1 month ago

dobladez commented 1 year ago

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 commented 1 year ago

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

gadams999 commented 1 month ago

Closing out due to no activity