Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance the look of Person (actor) #15

Closed
haakoo opened this issue Apr 2, 2019 · 5 comments
Closed

Enhance the look of Person (actor) #15

haakoo opened this issue Apr 2, 2019 · 5 comments
Milestone

Comments

@haakoo
Copy link

haakoo commented Apr 2, 2019

This projects is just what I need now, after getting stuck using Structurizr.Net to generate PlantUML.

There just one thing, the look of Person (Actor in PlantUML) which leave something to be desired. Would it be possible to either use the Actor element from PlantUML or modify the shape to look more like the shape used by Simon Brown in C4?

Do you have any plans to continue to enhance the look of the generated diagrams?

@coldacid
Copy link
Contributor

coldacid commented Apr 2, 2019

Unfortunately, PlantUML doesn't support custom shapes and probably never will. You can override the Person and Person_Ext macros to use the actor shape but even styled it leaves much to be desired in the output; I tried it a couple times and the results were unappealing compared to just using rectangles.

As for generating C4-PlantUML output with the Structurizr .NET libraries, you might be interested in https://gist.github.com/coldacid/465fa8f3a4cd3fdd7b640a65ad5b86f4 which is a writer for workspaces and individual views using C4-PlantUML.

@haakoo
Copy link
Author

haakoo commented Apr 2, 2019

I see, I'll stick with this for now then.

Another quick question, shouldn't the files be .iuml or have I misunderstood the difference between between the file endings?

And the files should have @startuml and @enduml - no?

@coldacid
Copy link
Contributor

coldacid commented Apr 2, 2019

If you look at WriteProlog() and WriteEpilog() in PlantUMLWriterBase you'll see that it does emit the @startuml and @enduml tags for each diagram. As for file extension, PlantUML honestly doesn't care and will parse out diagrams from any text files with those tags. .puml is pretty normal for standalone diagrams though, with .pinc or .iuml for included files.

@haakoo
Copy link
Author

haakoo commented Apr 3, 2019

I was thinking of C4.puml and the three other files in this repo.

Anyway, closing this as it's not much we can do before PlantUML changes.

@haakoo haakoo closed this as completed Apr 3, 2019
@ccll
Copy link

ccll commented Jul 27, 2020

You could just put a PlantUML sprite icon in Person rectangle like this:

!include <C4/C4_Container>
!include <awslib/AWSCommon>
!include <awslib/General/Users>
...
Person(user, "Users\n\n<$Users,color=white>\n\nUsers of our system")
...

image

@Potherca Potherca added this to the v2.0.0 milestone Apr 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

4 participants