[BUG] storage object parsed with tikz as rectangle

0 votes
asked Feb 23, 2017 in Bug by p1tt1 (140 points)

this plantumlcode:

@startuml
storage a
@enduml
parsed with tikz to:
% generated by Plantuml 8056      
\definecolor{plantucolor0000}{RGB}{254,254,206}
\definecolor{plantucolor0001}{RGB}{0,0,0}
\begin{tikzpicture}[yscale=-1]
\draw[color=black,fill=plantucolor0000,line width=1.5pt] (6pt,8pt) rectangle (34pt,47.0654pt);
\node at (16pt,18pt)[below right]{a};
\end{tikzpicture}
The storage object should be a circle, but is parsed as a rectangle.

 

1 Answer

0 votes
answered Feb 23, 2017 by plantuml (294,960 points)

Thanks for the report.
There is indeed an issue: the storage should be a rectangle with round border (and not a circle).
This is more obvious with the following example:

@startuml
storage this_a_very_long_storage
@enduml


We are not tikz expert here, so it would be nice if you could manually patch the generated tikz code to change the rectangle to a round border rectangle, and post the result back here.
Does it sound possible to you?

With your working example, it would allow us to fix this in PlantUML code.

Thanks again!

commented Feb 24, 2017 by p1tt1 (140 points)
mh...

can you use a code snippet like this:

```
\usetikzlibrary{shapes.misc, positioning}
 \definecolor{plantucolor0000}{RGB}{254,254,206}
 \begin{tikzpicture}
     \node [draw, color=black,fill=plantucolor0000,line width=1.5pt, rounded rectangle] {this\_a\_very\_long\_storage};
 \end{tikzpicture}
```
commented Feb 24, 2017 by plantuml (294,960 points)
Many thanks for your snippet, it helps!
We did it slightly differently, but it put us on the way.

So here is a new beta that should fix the issue:
https://dl.dropboxusercontent.com/u/13064071/plantuml.jar

Tell us if it works for you!
commented Feb 24, 2017 by p1tt1 (140 points)
mh...

your jar missing the main manifest attribute.

Are now also the corners of activity-diagram-nodes round? :-)
commented Feb 24, 2017 by plantuml (294,960 points)
Ops, sorry!
https://dl.dropboxusercontent.com/u/13064071/plantuml.jar should be ok now.
About corners of activity-diagram-nodes round, not sure to understand.
Could you post a minimum non-working example? Thanks
commented Feb 24, 2017 by p1tt1 (140 points)
plantuml:
```
@startuml
start
:rounded rectangle;
stop
@enduml
```

tikz:
```
% generated by Plantuml 8056      
\definecolor{plantucolor0000}{RGB}{0,0,0}
\definecolor{plantucolor0001}{RGB}{254,254,206}
\definecolor{plantucolor0002}{RGB}{168,0,54}
\begin{tikzpicture}[yscale=-1]
\draw[fill=black,line width=1.0pt] (71.5pt,20pt) ellipse (10pt and 10pt);
\draw[color=plantucolor0002,fill=plantucolor0001,line width=1.5pt] (10pt,50pt) rectangle (133pt,86.3418pt);
\node at (20pt,60pt)[below right]{rounded rectangle};
\draw[color=black,line width=1.0pt] (71.5pt,116.3418pt) ellipse (10pt and 10pt);
\draw[fill=black,line width=1.0pt] (72pt,116.8418pt) ellipse (6pt and 6pt);
\draw[color=plantucolor0002,line width=1.5pt] (71.5pt,30pt) -- (71.5pt,50pt);
\draw[color=plantucolor0002,fill=plantucolor0002,line width=1.0pt] (67.5pt,40pt) -- (71.5pt,50pt) -- (75.5pt,40pt) -- (71.5pt,44pt) -- cycle;
\draw[color=plantucolor0002,line width=1.5pt] (71.5pt,86.3418pt) -- (71.5pt,106.3418pt);
\draw[color=plantucolor0002,fill=plantucolor0002,line width=1.0pt] (67.5pt,96.3418pt) -- (71.5pt,106.3418pt) -- (75.5pt,96.3418pt) -- (71.5pt,100.3418pt) -- cycle;
\end{tikzpicture}
```

the rectangle within tikz hasn't round corners.
commented Feb 24, 2017 by plantuml (294,960 points)
Maybe you take the wrong plantuml.jar file (see line %generated by Plantuml 8056) ?

Version with % generated by Plantuml 8057beta6
seems to work fine for us.
(Last beta is 8057beta6)
commented Feb 24, 2017 by p1tt1 (140 points)
ah...

yes this was compiled by the old version.

with the new version, all coners so beautiful round ;-)

thanks
pitti
...