Please provide commands to import PNG and SVG images from jar files

+1 vote
asked Jan 7, 2016 in Closed feature request by anonymous
Currently we can define  external sprites (image from the filesystem) or internal sprites (textual representation).

Please provide also commands to import PNG and SVG images from jar files.

As an example, syntax could be something like

sprite foo1 jar:icons/archimate/business-process-16.png

1 Answer

0 votes
answered Oct 11, 2016 by Serge Wenger Work (9,890 points)
selected Jul 8 by Anthony-Gaudino
 
Best answer

You can import available sprites from the PlantUML STDLIB (http://plantuml.com/stdlib).
 


You can import available Archmate sprites (http://plantuml.com/archimate), sprite could be read from embedded png file:

sprite $aService jar:archimate/application-service

You can also import from your filesystem:

@startuml
sprite foo1 sprite1.png
Alice->Bob : hello <$foo1> there
@enduml

with last beta https://dl.dropboxusercontent.com/u/13064071/plantuml.jar

You can have:

@startuml
sprite foo1 some_file.jar~sprite1.png
Alice->Bob : hello <$foo1> there
@enduml

Where ~ delimits the file name (could be zip or jar) and the entry name in the zip/jar file.
This has not been highly tested...

You can also import SVGs:

sprite foo1 some_file.zip~sprite1.svg
sprite foo2 sprite2.svg
commented Nov 3, 2016 by Serge Wenger Work (9,890 points)
Thank you.
It works.
...