Hi there,
I'm using a SVG sprite to represent an InterruptFlow.
I've seen text-based sprites, but they get distorted when scaling.
I was able to use the SVG sprite in the node text, but not in the edge text.
Am I doing something wrong? If so, what would it be?
Any help is very much appreciated.
@startuml
' Part of this diagram is based on https://github.com/plantuml/plantuml/issues/1665
' === InterruptibleActivityRegion (thunder symbol) ===
' SVG
' adapted from https://www.svgrepo.com/svg/130890/thunder-bolt-arrow
sprite zigzagSvg <svg viewBox="0 0 32 32" xml:space="preserve">
<path d="m18.156 0-6.5688 11.016 17.952.0408-2.04-2.6724c-.204-.2652-.1632-.6528.1224-.8568.2652-.204.6528-.1632.8568.1224l3.2844 4.3044-7.956 4.0596c-.2856.1632-.6732.0408-.816-.2652-.1632-.306-.0408-.6732.2652-.816l0 0 5.202-2.652-18.9924-.0408 6.5688-11.016-15.4224-.0204c-.3264 0-.612-.2652-.612-.5916 0-.3264.2652-.612.5916-.612z"/>
</svg>
' ASCII
sprite $zigzagAscii {
0000000FFFFFFF00
000000000000F000
00000000000F0000
0000000000F00000
000000000F000F00
00000000F00000F0
0000000FFFFFFFFF
00000000000000F0
0000000000000F00
}
rectangle nodes {
:SVG sprite inline (no scale) <$zigzagSvg{scale=1}>;
kill
:SVG sprite inline with scale <$zigzagSvg{scale=0.6}>;
kill
:ASCII sprite (no scale) <$zigzagAscii{scale=1}>;
kill
: ASCII sprite with scale (gets distorted) <$zigzagAscii{scale=3}>;
kill
}
rectangle edges {
:A random node\n(didn't draw as input deliberately);
->ASCII sprite <$zigzagAscii> works;
:The previous transition must contain a ASCII sprite;
kill
:A random node\n(didn't draw as input deliberately);
->SVG sprite <$zigzagSvg> does not work;
:The previous transition must contain a SVG sprite;
}
@enduml