plantuml-stdlib / C4-PlantUML

C4-PlantUML combines the benefits of PlantUML and the C4 model for providing a simple way of describing and communicate software architectures
MIT License
6.33k stars 1.1k forks source link

Tags and sprites conflict in Rel (update: sprites have white background, should be transparent) #310

Closed biaji closed 1 year ago

biaji commented 1 year ago

Sample:

@startuml
!include <C4/C4_Component>
!include <material/common>
!include <material/close_circle>
AddRelTag("oth", $textColor="white")

System(all, "all"){
Component(test,"test","")
Component(test1,"test1","")
}
Rel(test, test1, "sfef", $tags="oth", $sprite="ma_close_circle")
@enduml

image

Which results in a white square instead of spirte itself. If remove the tags param, it displayed as normal

kirchsth commented 1 year ago

Hi @biaji,

good finding, I have to check all details, but I think its a bug in PlantUML (transparent part of the Rel() symbol should be displayed transparent and not white).

I could offer only a workaround until I have a final solution: You can color a sprite (independent of the Rel() color), e.g. with $sprite="ma_close_circle,color=red"

BR Helmut

PS.: the problem is not tag related, if you select another color (e.g. lightblue instead of white) then the sprite is displayed with the color

kirchsth commented 1 year ago

I entered an issue in forum

biaji commented 1 year ago

Hi @biaji,

good finding, I have to check all details, but I think its a bug in PlantUML (transparent part of the Rel() symbol should be displayed transparent and not white).

I could offer only a workaround until I have a final solution: You can color a sprite (independent of the Rel() color), e.g. with $sprite="ma_close_circle,color=red"

Cool~ That's it! It should be transparent background as you said.

kirchsth commented 1 year ago

@biaji: PlantUML team implemented a fix that it works starting with version v1.2023.9beta3, details see https://forum.plantuml.net/17926

PS.: the PlantUML picture above is cached for 5 days, therefore I used a minor changed Plantuml text that the updated image with the fix is displayed