skin for other diagram types than activity diagrams

+1 vote
asked Mar 23, 2015 in Wanted features by vogtadi (140 points)

I was experimenting with a custom skin. Applying this in a sequence diagram works fine, but I don't seem to be able to use it for other diagram types. Is this syntax different for other diagrams or is it just not implement?

 

' this one works

@startuml

skin BlueModern
a -> b
@enduml

 

' this results in a syntax error

@startuml

skin BlueModern
class a
@enduml

1 Answer

+1 vote
answered Mar 23, 2015 by plantuml (295,000 points)
Hello,

Skin is deprecated : so it's working only with sequence diagram, and we will not implement it for other diagrams.

(Some day, it will even be removed)

You should use skinparams (see http://plantuml.sourceforge.net/skinparam.html ) to change the rendering of diagrams.

Regards,
commented Mar 23, 2015 by vogtadi (140 points)
Thanks for the quick reply.

I am aware of the skinparam feature, which does a great deal for regular diagrams. The skin I started to play with, does something different than just using other colors etc. which could be achieved with the skinparams easily. I tries to mimic handwritten diagrams, which is a great way to get along the message, that this is just a sketch, but not the real thing. (example: http://pbrd.co/1EJq4mG)
commented Mar 23, 2015 by plantuml (295,000 points)
Ok.
I must say that I'm impressed with your drawing! It looks very nice!
However, we are facing an issue here.
As I said, Skin has been introduced in 2009, at the very beginning of PlantUML.
Since then, many things have changed, the global architecture of PlantUML has evolved, and Skin.java file is really dedicated to Sequence Diagram.

But we really like the idea of mimic handwritten, so here what we can do: have you any plan of publishing your code ?
If that's the case, we have two options:
- either we integrate it in the trunk code of PlantUML (in that case, we will of course credit the code to yourself)
- either we think about a new and more general way of doing skins. (Probably a decorator for UGraphic.java)

What do you think about it ?
commented Mar 27, 2015 by anonymous
Thanks for the flowers.

The code is actually relative straight forward and consists of a magic class, that does the handwriting and some minor changes to the drawing code of the "Rose" to basically replace lines (or boxes) with the scribble path. So a decorator pattern should not only be a good architectural decision but also a feasible technical solution.

I am more than happy to help the project and contribute as plantuml is a real helper in every day business. I just was too lazy so far to investigate how I should submit patches and features :-). If some of the main developers of plantuml are willing to integrate that idea, I am more than happy with submitting the status quo.
...