In a previous post we learned how to use the built-in icons from the OpenIconic set. In the newer PlantUML versions several icon sets have been added as standard library. These sets include AWS icons, Font Awesome icons, Devicons and Google Material icons.
In a previous post we learned how to use a
together block to keep elements together. We can also layout elements in a different way: using hidden lines. We define our elements and by using the keyword
[hidden] in our line definition the elements are layout as if there was a line, but we don’t see it. This gives us great flexibility on how we layout our elements.
We have a lot of ways to customize our PlantUML diagrams. We can change the colors and we can even set gradients as color. A gradient has two colors and a direction. The direction of the gradient is set by the separator between the two colors. We can use the following separators to set the gradient direction:
/: direction top left to bottom right
\: direction bottom left to top right
|: direction left to right
-: direction top to bottom
Drawing diagrams with PlantUML is fun and easy. We use text to describe the diagram and the we get a graphical representation. Especially in combination with Asciidoctor with PlantUML integration we have a winning combination to write technical documentation. Because our text is transformed into a graphical format like PNG we don’t have much influence on the layout. There are options to indicate positions of elements, but we can also use the length of lines to influence the position of elements.