1
0
mirror of https://github.com/octoleo/plantuml.git synced 2024-06-05 10:00:47 +00:00
Arnaud Roques 2022-04-03 14:18:33 +02:00
parent 35b05e7e6c
commit 7146f93b79
2 changed files with 19 additions and 10 deletions

View File

@ -83,8 +83,8 @@ public class FromSkinparamToStyle {
addMagic(SName.database);
addMagic(SName.entity);
addConFont("header", SName.header);
addConFont("footer", SName.footer);
addConFont("header", SName.document, SName.header);
addConFont("footer", SName.document, SName.footer);
addConvert("defaultFontSize", PName.FontSize, SName.element);
@ -172,11 +172,12 @@ public class FromSkinparamToStyle {
addConvert("BackgroundColor", PName.BackGroundColor, SName.document);
addConvert("classBackgroundColor", PName.BackGroundColor, SName.class_);
addConvert("classBorderColor", PName.LineColor, SName.class_);
addConFont("class", SName.class_);
addConFont("classAttribute", SName.class_);
addConvert("classBorderThickness", PName.LineThickness, SName.class_);
addConvert("classBackgroundColor", PName.BackGroundColor, SName.element, SName.class_);
addConvert("classBorderColor", PName.LineColor, SName.element, SName.class_);
addConFont("class", SName.element, SName.class_);
addConFont("classAttribute", SName.element, SName.class_);
addConvert("classBorderThickness", PName.LineThickness, SName.element, SName.class_);
addConvert("classHeaderBackgroundColor", PName.BackGroundColor, SName.element, SName.class_, SName.header);
addConvert("objectBackgroundColor", PName.BackGroundColor, SName.object);
addConvert("objectBorderColor", PName.LineColor, SName.object);

View File

@ -156,6 +156,13 @@ public class EntityImageClass extends AbstractEntityImage implements Stencil, Wi
.getMergedStyle(getSkinParam().getCurrentStyleBuilder());
}
private Style getStyleHeader() {
return StyleSignatureBasic.of(SName.root, SName.element, SName.classDiagram, SName.class_, SName.header) //
.withTOBECHANGED(getEntity().getStereotype()) //
.with(getEntity().getStereostyles()) //
.getMergedStyle(getSkinParam().getCurrentStyleBuilder());
}
private void drawInternal(UGraphic ug) {
final StringBounder stringBounder = ug.getStringBounder();
final Dimension2D dimTotal = calculateDimension(stringBounder);
@ -179,13 +186,14 @@ public class EntityImageClass extends AbstractEntityImage implements Stencil, Wi
classBorder = getStyle().value(PName.LineColor).asColor(getSkinParam().getThemeStyle(),
getSkinParam().getIHtmlColorSet());
if (headerBackcolor == null)
headerBackcolor = backcolor == null ? getStyleHeader().value(PName.BackGroundColor)
.asColor(getSkinParam().getThemeStyle(), getSkinParam().getIHtmlColorSet()) : backcolor;
if (backcolor == null)
backcolor = getStyle().value(PName.BackGroundColor).asColor(getSkinParam().getThemeStyle(),
getSkinParam().getIHtmlColorSet());
if (headerBackcolor == null)
headerBackcolor = backcolor;
} else {
if (getSkinParam().shadowing(getEntity().getStereotype()))
shadow = 4;