Welcome to PlantUML Q&A, where you can ask questions and receive answers from other members of the community.

You can also submit new features request and vote for them.

Support for sprites salt?

0 votes
Hi,
Is there anyway to use user defined sprites in salt? I was able to generate/encode a sprite that works great in uml diagram, but I fail to include it in my salt diagram. Is this not supported, or am I making a mistake?
 
With beta 16, I get a java.lang.illegralArgumentException, in saltUtils.createElement(salUtils.java:93) for the following code:
@startsalt
sprite $box [15x18/16] {
555555555555555
555555555555555
555555555555555
555555555555555
555555555555555
555555555555555
555555555555555
555555555555555
555555555555555
555555555555555
555555555555555
555555555555555
555555555555555
555555555555555
555555555555555
555555555555555
555555555555555
555555555555555
}
{
testing <$box>
}
@endsalt  
 
Thanks! 
Christophe
asked Mar 31 in Wanted features by Chris38 (390 points)

1 Answer

0 votes
 
Best answer

Salt does not share much code with the other diagrams, this is really an independant stuff.

So you cannot define sprite as in other diagrams.

However, there is an undocumented feature that is close to sprite. Using << and >> you can define a sprite-like drawing and reusing it latter.

For example:

@startsalt
 {
 [X] checkbox|[] checkbox
 () radio
 (X) radio
 This is a text|[This is my button]|This is another text
 "A field"|"Another long Field"|[A button]
 <<folder
 ............
 .XXXXX......
 .X...X......
 .XXXXXXXXXX.
 .X........X.
 .X........X.
 .X........X.
 .X........X.
 .XXXXXXXXXX.
 ............
 >>|other|<<folder>>
^Droplist^
}
@endsalt

Maybe you can use it instead ?

 

answered Mar 31 by plantuml (126,850 points)
selected Apr 7 by Chris38
Is it possible to scale such sprite-like thing?
Support This Project Offer 250 Mo! Follow PlantUML on Twitter
...