Inline SVG for sprites #1066
Replies: 6 comments 5 replies
-
Hello @arnaudroques, PlantUML team, and all, Very good... 👍
Yes it is very useful especially to have a complete SVG stack, and a PNG output as a fallback. Have a good summer. 🌞 |
Beta Was this translation helpful? Give feedback.
-
Currently, I help maintain several icon repositories (under https://github.com/plantuml-stdlib/). Most of these libs add icons/sprites to PlantUML (through https://github.com/plantuml/plantuml-stdlib/), by converting SVG to PNG to PlantUML Sprite. Each of these projects has their own conversion logic. Because of little quirks in the SVGs, the conversion tools used and/or PlantUML, a lot of time is spent/wasted this logic. So, regarding:
Being able to create sprites from SVG directly would be HUGE for these projects! It would mean a lot of sprite generation logic could be replaced by much simpler logic or simply removed. That would make it possible to spend time or automating the updates from source material, rather than having to maintain generation logic. |
Beta Was this translation helpful? Give feedback.
-
Any plans on supporting
|
Beta Was this translation helpful? Give feedback.
-
Hi there its a really useful feature, thanks for that, Im having problems with rotate transform, looks like its just rotating the center position, also looks like its not responding to the axis of rotation coordinates. Also it breaks when rotation is higher to 89 or lower to -89. For my case its not a problem, but maybe for other images it is. |
Beta Was this translation helpful? Give feedback.
-
Would be great to see this progress further - could an SVG library be 'plugged in' to PlantUML or are we talking significant surgery for Sprites to do this? New Object type? Some SVG libraries; |
Beta Was this translation helpful? Give feedback.
-
This would be very usefull |
Beta Was this translation helpful? Give feedback.
-
Last snapshot has an undocumented feature. You can now use inlined SVG for sprites.
For example:
or
The implementation is done through simple classes, so only few SVG directives are managed (
path
,ellipse
,circle
...). This means that you will probably have to compress your SVG (with something like this).However, the good news is that even if your sprite is SVG, diagrams could be generated to PNG/SVG/EPS (because SVG is parsed by PlantUML).
There are likely bugs here, so please tell us if you find any. The big question is also to know whether this is useful or not.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions