1
0
mirror of https://github.com/octoleo/plantuml.git synced 2024-11-21 20:45:10 +00:00

Import version 1.2022.5

This commit is contained in:
Arnaud Roques 2022-05-04 19:52:00 +02:00
parent 25a51b27e7
commit 93e5964e5f
92 changed files with 515 additions and 415 deletions

View File

@ -20,7 +20,7 @@
<target name="compile"> <target name="compile">
<delete dir="build" /> <delete dir="build" />
<mkdir dir="build" /> <mkdir dir="build" />
<javac target="1.7" source="1.7" srcdir="src" destdir="build" debug="on" /> <javac target="1.8" source="1.8" srcdir="src" destdir="build" debug="on" />
<copy file="src/net/sourceforge/plantuml/version/logo.png" <copy file="src/net/sourceforge/plantuml/version/logo.png"
todir="build/net/sourceforge/plantuml/version" /> todir="build/net/sourceforge/plantuml/version" />
<copy file="src/net/sourceforge/plantuml/version/favicon.png" <copy file="src/net/sourceforge/plantuml/version/favicon.png"

View File

@ -423,7 +423,7 @@ timingDiagram {
FontSize 12 FontSize 12
LineColor darkgreen LineColor darkgreen
BackgroundColor: var(--grey-blue); BackgroundColor: var(--grey-blue);
LineThickness 2 LineThickness 1.5
} }
robust { robust {
FontStyle plain FontStyle plain

View File

@ -136,6 +136,14 @@ group {
BackGroundColor transparent BackGroundColor transparent
} }
componentDiagram {
node, rectangle {
LineColor black
LineThickness 1.5
}
}
sequenceDiagram { sequenceDiagram {
group { group {
LineColor black LineColor black
@ -494,6 +502,7 @@ timingDiagram {
FontSize 12 FontSize 12
LineColor darkgreen LineColor darkgreen
BackgroundColor #c BackgroundColor #c
LineThickness 1.5
} }
robust { robust {
FontStyle plain FontStyle plain

View File

@ -217,7 +217,7 @@ public class SkinParam implements ISkinParam {
List<String> cleanForKeySlow(String key) { List<String> cleanForKeySlow(String key) {
key = StringUtils.trin(StringUtils.goLowerCase(key)); key = StringUtils.trin(StringUtils.goLowerCase(key));
key = key.replaceAll("_|\\.|\\s", ""); key = key.replaceAll("_|\\.", "");
// key = replaceSmart(key, "partition", "package"); // key = replaceSmart(key, "partition", "package");
key = replaceSmart(key, "sequenceparticipant", "participant"); key = replaceSmart(key, "sequenceparticipant", "participant");
key = replaceSmart(key, "sequenceactor", "actor"); key = replaceSmart(key, "sequenceactor", "actor");

View File

@ -258,7 +258,7 @@ public class CucaDiagramFileMakerElk implements CucaDiagramFileMaker {
final Style style = Cluster.getDefaultStyleDefinition(umlDiagramType.getStyleName(), group.getUSymbol()) final Style style = Cluster.getDefaultStyleDefinition(umlDiagramType.getStyleName(), group.getUSymbol())
.getMergedStyle(skinParam.getCurrentStyleBuilder()); .getMergedStyle(skinParam.getCurrentStyleBuilder());
final double shadowing = style.value(PName.Shadowing).asDouble(); final double shadowing = style.value(PName.Shadowing).asDouble();
final UStroke stroke = Cluster.getStrokeInternal(group, skinParam, style); final UStroke stroke = Cluster.getStrokeInternal(group, style);
HColor backColor = getBackColor(umlDiagramType); HColor backColor = getBackColor(umlDiagramType);
backColor = Cluster.getBackColor(backColor, skinParam, group.getStereotype(), umlDiagramType.getStyleName(), backColor = Cluster.getBackColor(backColor, skinParam, group.getStereotype(), umlDiagramType.getStyleName(),

View File

@ -110,7 +110,7 @@ public class SURL {
/** /**
* Regex to remove the UserInfo part from a URL. * Regex to remove the UserInfo part from a URL.
*/ */
private static final Pattern PATTERN_USERINFO = Pattern.compile("(^https?://)([-_:0-9a-zA-Z]+@)([^@]*)"); private static final Pattern PATTERN_USERINFO = Pattern.compile("(^https?://)([-_0-9a-zA-Z]+@)([^@]*)");
private static final ExecutorService EXE = Executors.newCachedThreadPool(new ThreadFactory() { private static final ExecutorService EXE = Executors.newCachedThreadPool(new ThreadFactory() {
public Thread newThread(Runnable r) { public Thread newThread(Runnable r) {

View File

@ -37,7 +37,6 @@ package net.sourceforge.plantuml.style;
import net.sourceforge.plantuml.SkinParam; import net.sourceforge.plantuml.SkinParam;
import net.sourceforge.plantuml.TitledDiagram; import net.sourceforge.plantuml.TitledDiagram;
import net.sourceforge.plantuml.UseStyle;
import net.sourceforge.plantuml.command.BlocLines; import net.sourceforge.plantuml.command.BlocLines;
import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.CommandExecutionResult;
import net.sourceforge.plantuml.command.CommandMultilines2; import net.sourceforge.plantuml.command.CommandMultilines2;

View File

@ -83,7 +83,7 @@ class Context {
final List<StyleSignatureBasic> tmp = new ArrayList<>(); final List<StyleSignatureBasic> tmp = new ArrayList<>();
for (StyleSignatureBasic ss : results) for (StyleSignatureBasic ss : results)
for (String name : names) for (String name : names)
tmp.add(ss.add(name)); tmp.add(ss.add(name.trim()));
results = tmp; results = tmp;
} }

View File

@ -210,6 +210,14 @@ public class FromSkinparamToStyle {
addMagic(SName.usecase); addMagic(SName.usecase);
addMagic(SName.map); addMagic(SName.map);
addMagic(SName.archimate); addMagic(SName.archimate);
// addConvert("nodeStereotypeFontSize", PName.FontSize, SName.node, SName.stereotype);
// addConvert("sequenceStereotypeFontSize", PName.FontSize, SName.stereotype);
// addConvert("sequenceStereotypeFontStyle", PName.FontStyle, SName.stereotype);
// addConvert("sequenceStereotypeFontColor", PName.FontColor, SName.stereotype);
// addConvert("sequenceStereotypeFontName", PName.FontName, SName.stereotype);
} }
@ -221,8 +229,14 @@ public class FromSkinparamToStyle {
addConvert(cleanName + "RoundCorner", PName.RoundCorner, sname); addConvert(cleanName + "RoundCorner", PName.RoundCorner, sname);
addConvert(cleanName + "DiagonalCorner", PName.DiagonalCorner, sname); addConvert(cleanName + "DiagonalCorner", PName.DiagonalCorner, sname);
addConvert(cleanName + "BorderStyle", PName.LineStyle, sname); addConvert(cleanName + "BorderStyle", PName.LineStyle, sname);
addConvert(cleanName + "StereotypeFontColor", PName.FontColor, SName.stereotype, sname);
addConFont(cleanName, sname); addConFont(cleanName, sname);
addConvert(cleanName + "Shadowing", PName.Shadowing, sname);
addConvert(cleanName + "StereotypeFontSize", PName.FontSize, SName.stereotype, sname);
addConvert(cleanName + "StereotypeFontStyle", PName.FontStyle, SName.stereotype, sname);
addConvert(cleanName + "StereotypeFontColor", PName.FontColor, SName.stereotype, sname);
addConvert(cleanName + "StereotypeFontName", PName.FontName, SName.stereotype, sname);
} }
private final List<Style> styles = new ArrayList<>(); private final List<Style> styles = new ArrayList<>();
@ -234,7 +248,7 @@ public class FromSkinparamToStyle {
if (key.contains("<<")) { if (key.contains("<<")) {
final StringTokenizer st = new StringTokenizer(key, "<>"); final StringTokenizer st = new StringTokenizer(key, "<>");
this.key = st.nextToken(); this.key = st.nextToken();
this.stereo = st.hasMoreTokens() ? st.nextToken() : null; this.stereo = st.hasMoreTokens() ? st.nextToken().trim() : null;
} else { } else {
this.key = key; this.key = key;
this.stereo = null; this.stereo = null;
@ -243,6 +257,12 @@ public class FromSkinparamToStyle {
} }
public void convertNow(String value, final AutomaticCounter counter) { public void convertNow(String value, final AutomaticCounter counter) {
if (key.endsWith("shadowing")) {
if (value.equalsIgnoreCase("false"))
value = "0";
else if (value.equalsIgnoreCase("true"))
value = "3";
}
if (value.equalsIgnoreCase("right:right")) if (value.equalsIgnoreCase("right:right"))
value = "right"; value = "right";
if (value.equalsIgnoreCase("dotted")) if (value.equalsIgnoreCase("dotted"))

View File

@ -164,7 +164,7 @@ public class StyleLoader {
final Matcher2 mKeyNames = keyName.matcher(trimmed); final Matcher2 mKeyNames = keyName.matcher(trimmed);
if (mKeyNames.find()) { if (mKeyNames.find()) {
String names = mKeyNames.group(1).replace(" ", ""); String names = mKeyNames.group(1);
final boolean isRecurse = mKeyNames.group(2) != null; final boolean isRecurse = mKeyNames.group(2) != null;
if (isRecurse) if (isRecurse)
names += "*"; names += "*";

View File

@ -35,9 +35,8 @@
*/ */
package net.sourceforge.plantuml.svek; package net.sourceforge.plantuml.svek;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.AbstractTextBlock;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.SymbolContext; import net.sourceforge.plantuml.graphic.SymbolContext;

View File

@ -35,9 +35,8 @@
*/ */
package net.sourceforge.plantuml.svek; package net.sourceforge.plantuml.svek;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.AbstractTextBlock;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlock;

View File

@ -74,11 +74,10 @@ import net.sourceforge.plantuml.graphic.USymbols;
import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.graphic.color.ColorType;
import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.graphic.color.Colors;
import net.sourceforge.plantuml.posimo.Moveable; import net.sourceforge.plantuml.posimo.Moveable;
import net.sourceforge.plantuml.skin.rose.Rose;
import net.sourceforge.plantuml.style.StyleSignature;
import net.sourceforge.plantuml.style.PName; import net.sourceforge.plantuml.style.PName;
import net.sourceforge.plantuml.style.SName; import net.sourceforge.plantuml.style.SName;
import net.sourceforge.plantuml.style.Style; import net.sourceforge.plantuml.style.Style;
import net.sourceforge.plantuml.style.StyleSignature;
import net.sourceforge.plantuml.style.StyleSignatureBasic; import net.sourceforge.plantuml.style.StyleSignatureBasic;
import net.sourceforge.plantuml.svek.image.EntityImageState; import net.sourceforge.plantuml.svek.image.EntityImageState;
import net.sourceforge.plantuml.ugraphic.UComment; import net.sourceforge.plantuml.ugraphic.UComment;
@ -308,7 +307,7 @@ public class Cluster implements Moveable {
.withTOBECHANGED(stereotype); .withTOBECHANGED(stereotype);
} }
public void drawU(UGraphic ug, UmlDiagramType umlDiagramType, ISkinParam skinParam2) { public void drawU(UGraphic ug, UmlDiagramType umlDiagramType, ISkinParam skinParam2unused) {
if (group.isHidden()) if (group.isHidden())
return; return;
@ -316,40 +315,17 @@ public class Cluster implements Moveable {
if (fullName.startsWith("##") == false) if (fullName.startsWith("##") == false)
ug.draw(new UComment("cluster " + fullName)); ug.draw(new UComment("cluster " + fullName));
final USymbol uSymbol = group.getUSymbol() == null ? USymbols.PACKAGE : group.getUSymbol();
Style style = getDefaultStyleDefinition(umlDiagramType.getStyleName(), uSymbol)
.withTOBECHANGED(group.getStereotype()).getMergedStyle(skinParam.getCurrentStyleBuilder());
final double shadowing = style.value(PName.Shadowing).asDouble();
HColor borderColor; HColor borderColor;
Style style = null; if (group.getColors().getColor(ColorType.LINE) != null)
final double rounded; borderColor = group.getColors().getColor(ColorType.LINE);
final double diagonalCorner; else
final double shadowing; borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet());
if (UseStyle.useBetaStyle()) { final double rounded = style.value(PName.RoundCorner).asDouble();
final USymbol uSymbol = group.getUSymbol() == null ? USymbols.PACKAGE : group.getUSymbol(); final double diagonalCorner = style.value(PName.DiagonalCorner).asDouble();
final StyleSignatureBasic tmp = getDefaultStyleDefinition(umlDiagramType.getStyleName(), uSymbol);
style = tmp.withTOBECHANGED(group.getStereotype()).getMergedStyle(skinParam.getCurrentStyleBuilder());
shadowing = style.value(PName.Shadowing).asDouble();
if (group.getColors().getColor(ColorType.LINE) != null)
borderColor = group.getColors().getColor(ColorType.LINE);
else
borderColor = style.value(PName.LineColor).asColor(skinParam2.getThemeStyle(),
skinParam2.getIHtmlColorSet());
rounded = style.value(PName.RoundCorner).asDouble();
diagonalCorner = style.value(PName.DiagonalCorner).asDouble();
} else {
if (group.getUSymbol() == null)
shadowing = skinParam2.shadowing2(group.getStereotype(), USymbols.PACKAGE.getSkinParameter()) ? 3 : 0;
else
shadowing = skinParam2.shadowing2(group.getStereotype(), group.getUSymbol().getSkinParameter()) ? 3 : 0;
rounded = IEntityImage.CORNER;
if (umlDiagramType == UmlDiagramType.STATE)
borderColor = getColor(ColorParam.stateBorder, skinParam, group.getStereotype());
else if (umlDiagramType == UmlDiagramType.ACTIVITY)
borderColor = getColor(ColorParam.packageBorder, skinParam, group.getStereotype());
else
borderColor = getColor(ColorParam.packageBorder, skinParam, group.getStereotype());
diagonalCorner = 0;
}
ug.startGroup(Collections.singletonMap(UGroupType.ID, "cluster_" + fullName)); ug.startGroup(Collections.singletonMap(UGroupType.ID, "cluster_" + fullName));
@ -368,49 +344,30 @@ public class Cluster implements Moveable {
final boolean isState = umlDiagramType == UmlDiagramType.STATE; final boolean isState = umlDiagramType == UmlDiagramType.STATE;
if (isState && group.getUSymbol() == null) { if (isState && group.getUSymbol() == null) {
UStroke strokeForState = getDefaultStyleDefinition(SName.stateDiagram, null) drawUState(ug, umlDiagramType, rounded, shadowing);
.getMergedStyle(skinParam.getCurrentStyleBuilder()).getStroke();
if (group.getColors().getSpecificLineStroke() != null)
strokeForState = group.getColors().getSpecificLineStroke();
if (group.getColors().getColor(ColorType.LINE) != null)
borderColor = group.getColors().getColor(ColorType.LINE);
drawUState(ug, borderColor, skinParam2, strokeForState, umlDiagramType, rounded, shadowing);
return; return;
} }
PackageStyle packageStyle = group.getPackageStyle(); PackageStyle packageStyle = group.getPackageStyle();
if (packageStyle == null) if (packageStyle == null)
packageStyle = skinParam2.packageStyle(); packageStyle = skinParam.packageStyle();
if (border != null) { if (border != null) {
final HColor tmp = skinParam2.getHtmlColor(border, group.getStereotype(), false); final HColor tmp = skinParam.getHtmlColor(border, group.getStereotype(), false);
if (tmp != null) if (tmp != null)
borderColor = tmp; borderColor = tmp;
} }
final UStroke stroke; final UStroke stroke = getStrokeInternal(group, style);
if (UseStyle.useBetaStyle())
stroke = getStrokeInternal(group, skinParam2, style);
else
stroke = getStrokeInternal(group, skinParam2, null);
HColor backColor = getBackColor(umlDiagramType, style); HColor backColor = getBackColor(umlDiagramType, style);
backColor = getBackColor(backColor, skinParam2, group.getStereotype(), umlDiagramType.getStyleName(), backColor = getBackColor(backColor, skinParam, group.getStereotype(), umlDiagramType.getStyleName(),
group.getUSymbol()); group.getUSymbol());
if (ztitle != null || zstereo != null) { if (ztitle != null || zstereo != null) {
final double roundCorner;
if (UseStyle.useBetaStyle())
roundCorner = rounded;
else
roundCorner = group.getUSymbol() == null ? 0
: group.getUSymbol().getSkinParameter().getRoundCorner(skinParam, group.getStereotype());
final ClusterDecoration decoration = new ClusterDecoration(packageStyle, group.getUSymbol(), ztitle, final ClusterDecoration decoration = new ClusterDecoration(packageStyle, group.getUSymbol(), ztitle,
zstereo, minX, minY, maxX, maxY, stroke); zstereo, minX, minY, maxX, maxY, stroke);
decoration.drawU(ug, backColor, borderColor, shadowing, roundCorner, decoration.drawU(ug, backColor, borderColor, shadowing, rounded,
skinParam2.getHorizontalAlignment(AlignmentParam.packageTitleAlignment, null, false, null), skinParam.getHorizontalAlignment(AlignmentParam.packageTitleAlignment, null, false, null),
skinParam2.getStereotypeAlignment(), diagonalCorner); skinParam.getStereotypeAlignment(), diagonalCorner);
return; return;
} }
final URectangle rect = new URectangle(maxX - minX, maxY - minY); final URectangle rect = new URectangle(maxX - minX, maxY - minY);
@ -425,18 +382,12 @@ public class Cluster implements Moveable {
} }
} }
static public UStroke getStrokeInternal(IGroup group, ISkinParam skinParam, Style style) { static public UStroke getStrokeInternal(IGroup group, Style style) {
final Colors colors = group.getColors(); final Colors colors = group.getColors();
if (colors.getSpecificLineStroke() != null) if (colors.getSpecificLineStroke() != null)
return colors.getSpecificLineStroke(); return colors.getSpecificLineStroke();
if (style != null) return style.getStroke();
return style.getStroke();
if (group.getUSymbol() != null && group.getUSymbol() != USymbols.PACKAGE)
return group.getUSymbol().getSkinParameter().getStroke(skinParam, group.getStereotype());
return GeneralImageBuilder.getForcedStroke(group.getStereotype(), skinParam);
} }
public void manageEntryExitPoint(StringBounder stringBounder) { public void manageEntryExitPoint(StringBounder stringBounder) {
@ -477,12 +428,19 @@ public class Cluster implements Moveable {
} }
private HColor getColorLegacy(ISkinParam skinParam, ColorParam colorParam, Stereotype stereo) { // GroupPngMakerState
return new Rose().getHtmlColor(skinParam, stereo, colorParam); private Style getStyleStateHeader() {
return StyleSignatureBasic.of(SName.root, SName.element, SName.stateDiagram, SName.state, SName.header)
.withTOBECHANGED(group.getStereotype()).getMergedStyle(skinParam.getCurrentStyleBuilder());
} }
private void drawUState(UGraphic ug, HColor borderColor, ISkinParam skinParam2, UStroke stroke, private Style getStyleState() {
UmlDiagramType umlDiagramType, double rounded, double shadowing) { return StyleSignatureBasic.of(SName.root, SName.element, SName.stateDiagram, SName.state)
.withTOBECHANGED(group.getStereotype()).getMergedStyle(skinParam.getCurrentStyleBuilder());
}
// GroupPngMakerState
private void drawUState(UGraphic ug, UmlDiagramType umlDiagramType, double rounded, double shadowing) {
final Dimension2D total = new Dimension2DDouble(maxX - minX, maxY - minY); final Dimension2D total = new Dimension2DDouble(maxX - minX, maxY - minY);
final double suppY; final double suppY;
if (ztitle == null) if (ztitle == null)
@ -494,26 +452,33 @@ public class Cluster implements Moveable {
final Style styleGroup = getDefaultStyleDefinitionStateGroup(group.getStereotype()) final Style styleGroup = getDefaultStyleDefinitionStateGroup(group.getStereotype())
.getMergedStyle(skinParam.getCurrentStyleBuilder()); .getMergedStyle(skinParam.getCurrentStyleBuilder());
HColor stateBack = getBackColor(umlDiagramType, styleGroup); HColor borderColor = group.getColors().getColor(ColorType.LINE);
if (UseStyle.useBetaStyle() == false && stateBack == null) if (borderColor == null)
stateBack = getColorLegacy(skinParam2, ColorParam.stateBackground, group.getStereotype()); borderColor = getStyleState().value(PName.LineColor).asColor(skinParam.getThemeStyle(),
skinParam.getIHtmlColorSet());
final HColor background; HColor backColor = group.getColors().getColor(ColorType.BACK);
if (UseStyle.useBetaStyle() == false) if (backColor == null)
background = getColorLegacy(skinParam2, ColorParam.background, null); backColor = getStyleState().value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(),
else skinParam.getIHtmlColorSet());
background = stateBack;
final HColor imgBackcolor = getBackColor(umlDiagramType, styleGroup);
// final Style style = getStyle(FontParam.STATE_ATTRIBUTE, skinParam2); // final Style style = getStyle(FontParam.STATE_ATTRIBUTE, skinParam2);
final TextBlock attribute = GeneralImageBuilder.stateHeader(group, styleGroup, skinParam2); final TextBlock attribute = GeneralImageBuilder.stateHeader(group, styleGroup, skinParam);
final double attributeHeight = attribute.calculateDimension(ug.getStringBounder()).getHeight(); final double attributeHeight = attribute.calculateDimension(ug.getStringBounder()).getHeight();
if (total.getWidth() == 0) { if (total.getWidth() == 0) {
System.err.println("Cluster::drawUState issue"); System.err.println("Cluster::drawUState issue");
return; return;
} }
UStroke stroke = group.getColors().getSpecificLineStroke();
if (stroke == null)
stroke = getStyleState().getStroke();
final RoundedContainer r = new RoundedContainer(total, suppY, final RoundedContainer r = new RoundedContainer(total, suppY,
attributeHeight + (attributeHeight > 0 ? IEntityImage.MARGIN : 0), borderColor, stateBack, background, attributeHeight + (attributeHeight > 0 ? IEntityImage.MARGIN : 0), borderColor, backColor, imgBackcolor,
stroke, rounded, shadowing); stroke, rounded, shadowing);
r.drawU(ug.apply(new UTranslate(minX, minY))); r.drawU(ug.apply(new UTranslate(minX, minY)));
@ -919,20 +884,19 @@ public class Cluster implements Moveable {
final Stereotype stereo = group.getStereotype(); final Stereotype stereo = group.getStereotype();
if (UseStyle.useBetaStyle()) return style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet());
return style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet());
final USymbol sym = group.getUSymbol() == null ? USymbols.PACKAGE : group.getUSymbol(); // final USymbol sym = group.getUSymbol() == null ? USymbols.PACKAGE : group.getUSymbol();
final ColorParam backparam = umlDiagramType == UmlDiagramType.ACTIVITY ? ColorParam.partitionBackground // final ColorParam backparam = umlDiagramType == UmlDiagramType.ACTIVITY ? ColorParam.partitionBackground
: sym.getColorParamBack(); // : sym.getColorParamBack();
final HColor c1 = skinParam.getHtmlColor(backparam, stereo, false); // final HColor c1 = skinParam.getHtmlColor(backparam, stereo, false);
if (c1 != null) // if (c1 != null)
return c1; // return c1;
//
if (parentCluster == null) // if (parentCluster == null)
return null; // return null;
//
return parentCluster.getBackColor(umlDiagramType, style); // return parentCluster.getBackColor(umlDiagramType, style);
} }
public boolean isClusterOf(IEntity ent) { public boolean isClusterOf(IEntity ent) {

View File

@ -36,10 +36,10 @@
package net.sourceforge.plantuml.svek; package net.sourceforge.plantuml.svek;
import java.awt.geom.CubicCurve2D; import java.awt.geom.CubicCurve2D;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.geom.Point2D; import java.awt.geom.Point2D;
import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.posimo.BezierUtils; import net.sourceforge.plantuml.posimo.BezierUtils;
public class ClusterPosition { public class ClusterPosition {

View File

@ -35,7 +35,6 @@
*/ */
package net.sourceforge.plantuml.svek; package net.sourceforge.plantuml.svek;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;
@ -43,6 +42,7 @@ import java.util.List;
import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.ColorParam;
import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.AbstractTextBlock;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.skin.rose.Rose; import net.sourceforge.plantuml.skin.rose.Rose;

View File

@ -35,9 +35,8 @@
*/ */
package net.sourceforge.plantuml.svek; package net.sourceforge.plantuml.svek;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.AbstractTextBlock;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.SymbolContext; import net.sourceforge.plantuml.graphic.SymbolContext;

View File

@ -35,13 +35,13 @@
*/ */
package net.sourceforge.plantuml.svek; package net.sourceforge.plantuml.svek;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.List; import java.util.List;
import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.ColorParam;
import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.UseStyle; import net.sourceforge.plantuml.UseStyle;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.cucadiagram.Stereotype;
import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.AbstractTextBlock;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;

View File

@ -35,10 +35,10 @@
*/ */
package net.sourceforge.plantuml.svek; package net.sourceforge.plantuml.svek;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.Objects; import java.util.Objects;
import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.AbstractTextBlock;
import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HorizontalAlignment;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;

View File

@ -36,7 +36,6 @@
package net.sourceforge.plantuml.svek; package net.sourceforge.plantuml.svek;
import net.sourceforge.plantuml.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.AbstractTextBlock;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlock;

View File

@ -35,9 +35,8 @@
*/ */
package net.sourceforge.plantuml.svek; package net.sourceforge.plantuml.svek;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.Direction; import net.sourceforge.plantuml.Direction;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.AbstractTextBlock;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlock;

View File

@ -35,9 +35,8 @@
*/ */
package net.sourceforge.plantuml.svek; package net.sourceforge.plantuml.svek;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.AbstractTextBlock;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.SymbolContext; import net.sourceforge.plantuml.graphic.SymbolContext;

View File

@ -35,11 +35,11 @@
*/ */
package net.sourceforge.plantuml.svek; package net.sourceforge.plantuml.svek;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.geom.Rectangle2D; import java.awt.geom.Rectangle2D;
import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.UseStyle; import net.sourceforge.plantuml.UseStyle;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.graphic.InnerStrategy; import net.sourceforge.plantuml.graphic.InnerStrategy;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.ugraphic.MinMax; import net.sourceforge.plantuml.ugraphic.MinMax;

View File

@ -35,10 +35,10 @@
*/ */
package net.sourceforge.plantuml.svek; package net.sourceforge.plantuml.svek;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.geom.Rectangle2D; import java.awt.geom.Rectangle2D;
import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.cucadiagram.dot.Neighborhood; import net.sourceforge.plantuml.cucadiagram.dot.Neighborhood;
import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.AbstractTextBlock;
import net.sourceforge.plantuml.graphic.InnerStrategy; import net.sourceforge.plantuml.graphic.InnerStrategy;

View File

@ -102,10 +102,10 @@ import net.sourceforge.plantuml.graphic.USymbol;
import net.sourceforge.plantuml.graphic.USymbolHexagon; import net.sourceforge.plantuml.graphic.USymbolHexagon;
import net.sourceforge.plantuml.graphic.USymbolInterface; import net.sourceforge.plantuml.graphic.USymbolInterface;
import net.sourceforge.plantuml.graphic.USymbols; import net.sourceforge.plantuml.graphic.USymbols;
import net.sourceforge.plantuml.style.StyleSignature;
import net.sourceforge.plantuml.style.PName; import net.sourceforge.plantuml.style.PName;
import net.sourceforge.plantuml.style.SName; import net.sourceforge.plantuml.style.SName;
import net.sourceforge.plantuml.style.Style; import net.sourceforge.plantuml.style.Style;
import net.sourceforge.plantuml.style.StyleSignature;
import net.sourceforge.plantuml.style.StyleSignatureBasic; import net.sourceforge.plantuml.style.StyleSignatureBasic;
import net.sourceforge.plantuml.svek.image.EntityImageActivity; import net.sourceforge.plantuml.svek.image.EntityImageActivity;
import net.sourceforge.plantuml.svek.image.EntityImageArcCircle; import net.sourceforge.plantuml.svek.image.EntityImageArcCircle;
@ -703,24 +703,26 @@ public final class GeneralImageBuilder {
return TextBlockUtils.empty(0, 0); return TextBlockUtils.empty(0, 0);
final ISkinParam skinParam = dotData.getSkinParam(); final ISkinParam skinParam = dotData.getSkinParam();
final FontConfiguration fontConfiguration;
if (UseStyle.useBetaStyle()) {
final SName sname = dotData.getUmlDiagramType().getStyleName();
final StyleSignatureBasic signature;
final USymbol uSymbol = g.getUSymbol();
if (uSymbol == USymbols.RECTANGLE)
signature = StyleSignatureBasic.of(SName.root, SName.element, sname, uSymbol.getSName(), SName.title);
else
signature = StyleSignatureBasic.of(SName.root, SName.element, sname, SName.title);
final Style style = signature // final SName sname = dotData.getUmlDiagramType().getStyleName();
.withTOBECHANGED(g.getStereotype()) // final StyleSignatureBasic signature;
.with(g.getStereostyles()) // final USymbol uSymbol = g.getUSymbol();
.getMergedStyle(skinParam.getCurrentStyleBuilder()); if (g.getGroupType() == GroupType.STATE)
signature = StyleSignatureBasic.of(SName.root, SName.element, SName.stateDiagram, SName.state,
SName.header);
else if (uSymbol == USymbols.RECTANGLE)
signature = StyleSignatureBasic.of(SName.root, SName.element, sname, uSymbol.getSName(), SName.title);
else
signature = StyleSignatureBasic.of(SName.root, SName.element, sname, SName.title);
final Style style = signature //
.withTOBECHANGED(g.getStereotype()) //
.with(g.getStereostyles()) //
.getMergedStyle(skinParam.getCurrentStyleBuilder());
final FontConfiguration fontConfiguration = style.getFontConfiguration(skinParam.getThemeStyle(),
skinParam.getIHtmlColorSet());
fontConfiguration = style.getFontConfiguration(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet());
} else
fontConfiguration = g.getFontConfigurationForTitle(skinParam);
final HorizontalAlignment alignment = HorizontalAlignment.CENTER; final HorizontalAlignment alignment = HorizontalAlignment.CENTER;
return label.create(fontConfiguration, alignment, dotData.getSkinParam()); return label.create(fontConfiguration, alignment, dotData.getSkinParam());
} }

View File

@ -36,7 +36,6 @@
package net.sourceforge.plantuml.svek; package net.sourceforge.plantuml.svek;
import java.awt.Color; import java.awt.Color;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -44,6 +43,7 @@ import java.util.List;
import net.sourceforge.plantuml.BackSlash; import net.sourceforge.plantuml.BackSlash;
import net.sourceforge.plantuml.OptionPrint; import net.sourceforge.plantuml.OptionPrint;
import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.StringUtils;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.CommandExecutionResult;
import net.sourceforge.plantuml.cucadiagram.dot.GraphvizUtils; import net.sourceforge.plantuml.cucadiagram.dot.GraphvizUtils;
import net.sourceforge.plantuml.flashcode.FlashCodeFactory; import net.sourceforge.plantuml.flashcode.FlashCodeFactory;

View File

@ -40,10 +40,7 @@ import java.util.Collection;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import net.sourceforge.plantuml.ColorParam;
import net.sourceforge.plantuml.FontParam;
import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.UseStyle;
import net.sourceforge.plantuml.cucadiagram.CucaDiagram; import net.sourceforge.plantuml.cucadiagram.CucaDiagram;
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.cucadiagram.EntityUtils; import net.sourceforge.plantuml.cucadiagram.EntityUtils;
@ -62,7 +59,6 @@ import net.sourceforge.plantuml.graphic.HorizontalAlignment;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.graphic.color.ColorType;
import net.sourceforge.plantuml.skin.rose.Rose;
import net.sourceforge.plantuml.style.PName; import net.sourceforge.plantuml.style.PName;
import net.sourceforge.plantuml.style.SName; import net.sourceforge.plantuml.style.SName;
import net.sourceforge.plantuml.style.Style; import net.sourceforge.plantuml.style.Style;
@ -128,30 +124,18 @@ public final class GroupPngMakerState {
} }
private Style getStyleState() { private Style getStyleState() {
return StyleSignatureBasic.of(SName.root, SName.element, SName.stateDiagram, SName.state).withTOBECHANGED(group.getStereotype()) return StyleSignatureBasic.of(SName.root, SName.element, SName.stateDiagram, SName.state)
.getMergedStyle(diagram.getSkinParam().getCurrentStyleBuilder()); .withTOBECHANGED(group.getStereotype()).getMergedStyle(diagram.getSkinParam().getCurrentStyleBuilder());
} }
public IEntityImage getImage() { public IEntityImage getImage() {
final Display display = group.getDisplay(); final Display display = group.getDisplay();
final ISkinParam skinParam = diagram.getSkinParam(); final ISkinParam skinParam = diagram.getSkinParam();
final FontConfiguration fontConfiguration; final double rounded = getStyleState().value(PName.RoundCorner).asDouble();
final double rounded; final double shadowing = getStyleState().value(PName.Shadowing).asDouble();
double shadowing = 0; final FontConfiguration fontConfiguration = getStyleStateHeader()
.getFontConfiguration(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet());
if (UseStyle.useBetaStyle()) {
rounded = getStyleState().value(PName.RoundCorner).asDouble();
shadowing = getStyleState().value(PName.Shadowing).asDouble();
fontConfiguration = getStyleStateHeader().getFontConfiguration(skinParam.getThemeStyle(),
skinParam.getIHtmlColorSet());
} else {
rounded = IEntityImage.CORNER;
fontConfiguration = FontConfiguration.create(skinParam, FontParam.STATE, group.getStereotype());
if (skinParam.shadowing(group.getStereotype()))
shadowing = 3.0;
}
final TextBlock title = display.create(fontConfiguration, HorizontalAlignment.CENTER, diagram.getSkinParam()); final TextBlock title = display.create(fontConfiguration, HorizontalAlignment.CENTER, diagram.getSkinParam());
if (group.size() == 0 && group.getChildren().size() == 0) if (group.size() == 0 && group.getChildren().size() == 0)
@ -175,30 +159,18 @@ public final class GroupPngMakerState {
HColor borderColor = group.getColors().getColor(ColorType.LINE); HColor borderColor = group.getColors().getColor(ColorType.LINE);
if (borderColor == null) if (borderColor == null)
if (UseStyle.useBetaStyle()) borderColor = getStyleState().value(PName.LineColor).asColor(skinParam.getThemeStyle(),
borderColor = getStyleState().value(PName.LineColor).asColor(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet());
skinParam.getIHtmlColorSet());
else
borderColor = getColor(ColorParam.stateBorder, group.getStereotype());
final Stereotype stereo = group.getStereotype(); final Stereotype stereo = group.getStereotype();
final HColor tmp = group.getColors().getColor(ColorType.BACK); HColor backColor = group.getColors().getColor(ColorType.BACK);
final HColor backColor; if (backColor == null)
if (tmp == null) backColor = getStyleState().value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(),
if (UseStyle.useBetaStyle()) skinParam.getIHtmlColorSet());
backColor = getStyleState().value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(),
skinParam.getIHtmlColorSet());
else
backColor = getColor(ColorParam.stateBackground, stereo);
else
backColor = tmp;
UStroke stroke = group.getColors().getSpecificLineStroke(); UStroke stroke = group.getColors().getSpecificLineStroke();
if (stroke == null) if (stroke == null)
if (UseStyle.useBetaStyle()) stroke = getStyleState().getStroke();
stroke = getStyleState().getStroke();
else
stroke = new UStroke(1.5);
final TextBlock attribute = GeneralImageBuilder.stateHeader((IEntity) group, null, skinParam); final TextBlock attribute = GeneralImageBuilder.stateHeader((IEntity) group, null, skinParam);
@ -236,10 +208,4 @@ public final class GroupPngMakerState {
return true; return true;
} }
private final Rose rose = new Rose();
private HColor getColor(ColorParam colorParam, Stereotype stereo) {
final ISkinParam skinParam = diagram.getSkinParam();
return rose.getHtmlColor(skinParam, stereo, colorParam);
}
} }

View File

@ -35,9 +35,8 @@
*/ */
package net.sourceforge.plantuml.svek; package net.sourceforge.plantuml.svek;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.graphic.TextBlockEmpty; import net.sourceforge.plantuml.graphic.TextBlockEmpty;

View File

@ -36,7 +36,6 @@
package net.sourceforge.plantuml.svek; package net.sourceforge.plantuml.svek;
import net.sourceforge.plantuml.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.AbstractTextBlock;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UGraphic;

View File

@ -35,10 +35,9 @@
*/ */
package net.sourceforge.plantuml.svek; package net.sourceforge.plantuml.svek;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.Url;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.AbstractTextBlock;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlock;

View File

@ -36,10 +36,10 @@
*/ */
package net.sourceforge.plantuml.svek; package net.sourceforge.plantuml.svek;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.EnumSet; import java.util.EnumSet;
import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.graphic.USymbol; import net.sourceforge.plantuml.graphic.USymbol;
import net.sourceforge.plantuml.graphic.USymbols; import net.sourceforge.plantuml.graphic.USymbols;
import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UGraphic;

View File

@ -36,13 +36,15 @@
package net.sourceforge.plantuml.svek; package net.sourceforge.plantuml.svek;
import net.sourceforge.plantuml.awt.geom.Dimension2D; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.ULine;
import net.sourceforge.plantuml.ugraphic.UPath;
import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.URectangle;
import net.sourceforge.plantuml.ugraphic.UShape;
import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UStroke;
import net.sourceforge.plantuml.ugraphic.UTranslate; import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.HColor; import net.sourceforge.plantuml.ugraphic.color.HColor;
import net.sourceforge.plantuml.ugraphic.color.HColorUtils;
public final class RoundedContainer { public final class RoundedContainer {
@ -58,9 +60,9 @@ public final class RoundedContainer {
public RoundedContainer(Dimension2D dim, double titleHeight, double attributeHeight, HColor borderColor, public RoundedContainer(Dimension2D dim, double titleHeight, double attributeHeight, HColor borderColor,
HColor backColor, HColor imgBackcolor, UStroke stroke, double rounded, double shadowing) { HColor backColor, HColor imgBackcolor, UStroke stroke, double rounded, double shadowing) {
if (dim.getWidth() == 0) { if (dim.getWidth() == 0)
throw new IllegalArgumentException(); throw new IllegalArgumentException();
}
this.rounded = rounded; this.rounded = rounded;
this.dim = dim; this.dim = dim;
this.imgBackcolor = imgBackcolor; this.imgBackcolor = imgBackcolor;
@ -73,28 +75,28 @@ public final class RoundedContainer {
} }
public void drawU(UGraphic ug) { public void drawU(UGraphic ug) {
ug = ug.apply(backColor.bg()).apply(borderColor); ug = ug.apply(backColor.bg()).apply(borderColor).apply(stroke);
final URectangle rect = new URectangle(dim.getWidth(), dim.getHeight()).rounded(rounded); final URectangle rect = new URectangle(dim.getWidth(), dim.getHeight()).rounded(rounded);
rect.setDeltaShadow(shadowing);
ug.apply(stroke).draw(rect);
final double yLine = titleHeight + attributeHeight; if (shadowing > 0) {
rect.setDeltaShadow(shadowing);
ug = ug.apply(imgBackcolor.bg()); ug.apply(HColorUtils.transparent().bg()).draw(rect);
rect.setDeltaShadow(0);
final double thickness = stroke.getThickness();
final URectangle inner = new URectangle(dim.getWidth() - 4 * thickness,
dim.getHeight() - titleHeight - 4 * thickness - attributeHeight).rounded(rounded);
ug.apply(imgBackcolor).apply(new UTranslate(2 * thickness, yLine + 2 * thickness)).draw(inner);
if (titleHeight > 0) {
ug.apply(stroke).apply(UTranslate.dy(yLine)).draw(ULine.hline(dim.getWidth()));
} }
final double headerHeight = titleHeight + attributeHeight;
if (attributeHeight > 0) { new RoundedNorth(dim.getWidth(), headerHeight, backColor, rounded).drawU(ug);
ug.apply(stroke).apply(UTranslate.dy(yLine - attributeHeight)).draw(ULine.hline(dim.getWidth())); new RoundedSouth(dim.getWidth(), dim.getHeight() - headerHeight, imgBackcolor, rounded)
} .drawU(ug.apply(UTranslate.dy(headerHeight)));
ug.apply(HColorUtils.transparent().bg()).draw(rect);
if (headerHeight > 0)
ug.apply(UTranslate.dy(headerHeight)).draw(ULine.hline(dim.getWidth()));
if (attributeHeight > 0)
ug.apply(UTranslate.dy(titleHeight)).draw(ULine.hline(dim.getWidth()));
} }
} }

View File

@ -0,0 +1,88 @@
/* ========================================================================
* PlantUML : a free UML diagram generator
* ========================================================================
*
* (C) Copyright 2009-2023, Arnaud Roques
*
* Project Info: http://plantuml.com
*
* If you like this project or if you find it useful, you can support us at:
*
* http://plantuml.com/patreon (only 1$ per month!)
* http://plantuml.com/paypal
*
* This file is part of PlantUML.
*
* PlantUML is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PlantUML distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
* License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
* USA.
*
*
* Original Author: Arnaud Roques
*
*
*/
package net.sourceforge.plantuml.svek;
import net.sourceforge.plantuml.graphic.UDrawable;
import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.UPath;
import net.sourceforge.plantuml.ugraphic.URectangle;
import net.sourceforge.plantuml.ugraphic.UShape;
import net.sourceforge.plantuml.ugraphic.UStroke;
import net.sourceforge.plantuml.ugraphic.color.HColor;
import net.sourceforge.plantuml.ugraphic.color.HColorUtils;
public final class RoundedNorth implements UDrawable {
private final double width;
private final double height;
private final HColor backColor;
private final double rounded;
public RoundedNorth(double width, double height, HColor backColor, double rounded) {
if (width == 0)
throw new IllegalArgumentException();
if (height == 0)
throw new IllegalArgumentException();
this.width = width;
this.height = height;
this.rounded = rounded;
this.backColor = backColor;
}
public void drawU(UGraphic ug) {
if (HColorUtils.isTransparent(backColor))
return;
final UShape header;
if (rounded == 0) {
header = new URectangle(width, height);
} else {
final UPath path = new UPath();
path.moveTo(rounded / 2, 0);
path.lineTo(width - rounded / 2, 0);
path.arcTo(rounded / 2, rounded / 2, 0, 0, 1, width, rounded / 2);
path.lineTo(width, height);
path.lineTo(0, height);
path.lineTo(0, rounded / 2);
path.arcTo(rounded / 2, rounded / 2, 0, 0, 1, rounded / 2, 0);
path.closePath();
header = path;
}
ug.apply(new UStroke()).apply(backColor).apply(backColor.bg()).draw(header);
}
}

View File

@ -0,0 +1,88 @@
/* ========================================================================
* PlantUML : a free UML diagram generator
* ========================================================================
*
* (C) Copyright 2009-2023, Arnaud Roques
*
* Project Info: http://plantuml.com
*
* If you like this project or if you find it useful, you can support us at:
*
* http://plantuml.com/patreon (only 1$ per month!)
* http://plantuml.com/paypal
*
* This file is part of PlantUML.
*
* PlantUML is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PlantUML distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
* License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
* USA.
*
*
* Original Author: Arnaud Roques
*
*
*/
package net.sourceforge.plantuml.svek;
import net.sourceforge.plantuml.graphic.UDrawable;
import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.UPath;
import net.sourceforge.plantuml.ugraphic.URectangle;
import net.sourceforge.plantuml.ugraphic.UShape;
import net.sourceforge.plantuml.ugraphic.UStroke;
import net.sourceforge.plantuml.ugraphic.color.HColor;
import net.sourceforge.plantuml.ugraphic.color.HColorUtils;
public final class RoundedSouth implements UDrawable {
private final double width;
private final double height;
private final HColor backColor;
private final double rounded;
public RoundedSouth(double width, double height, HColor backColor, double rounded) {
if (width == 0)
throw new IllegalArgumentException();
if (height == 0)
throw new IllegalArgumentException();
this.width = width;
this.height = height;
this.rounded = rounded;
this.backColor = backColor;
}
public void drawU(UGraphic ug) {
if (HColorUtils.isTransparent(backColor))
return;
final UShape header;
if (rounded == 0) {
header = new URectangle(width, height);
} else {
final UPath path = new UPath();
path.moveTo(0, 0);
path.lineTo(width, 0);
path.lineTo(width, height - rounded / 2);
path.arcTo(rounded / 2, rounded / 2, 0, 0, 1, width - rounded / 2, height);
path.lineTo(rounded / 2, height);
path.arcTo(rounded / 2, rounded / 2, 0, 0, 1, 0, height - rounded / 2);
path.lineTo(0, 0);
path.closePath();
header = path;
}
ug.apply(new UStroke()).apply(backColor).apply(backColor.bg()).draw(header);
}
}

View File

@ -35,7 +35,6 @@
*/ */
package net.sourceforge.plantuml.svek; package net.sourceforge.plantuml.svek;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.geom.Point2D; import java.awt.geom.Point2D;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
@ -57,6 +56,7 @@ import net.sourceforge.plantuml.Pragma;
import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.StringUtils;
import net.sourceforge.plantuml.UmlDiagramType; import net.sourceforge.plantuml.UmlDiagramType;
import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.Url;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.command.Position; import net.sourceforge.plantuml.command.Position;
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.cucadiagram.EntityPort; import net.sourceforge.plantuml.cucadiagram.EntityPort;

View File

@ -35,13 +35,13 @@
*/ */
package net.sourceforge.plantuml.svek; package net.sourceforge.plantuml.svek;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.geom.Point2D; import java.awt.geom.Point2D;
import java.util.List; import java.util.List;
import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.Hideable; import net.sourceforge.plantuml.Hideable;
import net.sourceforge.plantuml.StringUtils; import net.sourceforge.plantuml.StringUtils;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.cucadiagram.EntityPosition; import net.sourceforge.plantuml.cucadiagram.EntityPosition;
import net.sourceforge.plantuml.cucadiagram.IGroup; import net.sourceforge.plantuml.cucadiagram.IGroup;
import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.ILeaf;

View File

@ -49,11 +49,11 @@ import net.sourceforge.plantuml.graphic.AbstractTextBlock;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.graphic.TextBlockUtils;
import net.sourceforge.plantuml.skin.rose.Rose; import net.sourceforge.plantuml.skin.rose.Rose;
import net.sourceforge.plantuml.style.StyleSignature;
import net.sourceforge.plantuml.style.PName; import net.sourceforge.plantuml.style.PName;
import net.sourceforge.plantuml.style.SName; import net.sourceforge.plantuml.style.SName;
import net.sourceforge.plantuml.style.Style; import net.sourceforge.plantuml.style.Style;
import net.sourceforge.plantuml.style.StyleBuilder; import net.sourceforge.plantuml.style.StyleBuilder;
import net.sourceforge.plantuml.style.StyleSignature;
import net.sourceforge.plantuml.style.StyleSignatureBasic; import net.sourceforge.plantuml.style.StyleSignatureBasic;
import net.sourceforge.plantuml.ugraphic.MinMax; import net.sourceforge.plantuml.ugraphic.MinMax;
import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UGraphic;

View File

@ -36,10 +36,9 @@
package net.sourceforge.plantuml.svek.image; package net.sourceforge.plantuml.svek.image;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.FontParam;
import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.cucadiagram.EntityPosition; import net.sourceforge.plantuml.cucadiagram.EntityPosition;
import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.ILeaf;
import net.sourceforge.plantuml.cucadiagram.Rankdir; import net.sourceforge.plantuml.cucadiagram.Rankdir;

View File

@ -50,10 +50,10 @@ import net.sourceforge.plantuml.graphic.HorizontalAlignment;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.graphic.color.ColorType;
import net.sourceforge.plantuml.style.StyleSignature;
import net.sourceforge.plantuml.style.PName; import net.sourceforge.plantuml.style.PName;
import net.sourceforge.plantuml.style.SName; import net.sourceforge.plantuml.style.SName;
import net.sourceforge.plantuml.style.Style; import net.sourceforge.plantuml.style.Style;
import net.sourceforge.plantuml.style.StyleSignature;
import net.sourceforge.plantuml.style.StyleSignatureBasic; import net.sourceforge.plantuml.style.StyleSignatureBasic;
import net.sourceforge.plantuml.svek.AbstractEntityImage; import net.sourceforge.plantuml.svek.AbstractEntityImage;
import net.sourceforge.plantuml.svek.Bibliotekon; import net.sourceforge.plantuml.svek.Bibliotekon;

View File

@ -35,12 +35,11 @@
*/ */
package net.sourceforge.plantuml.svek.image; package net.sourceforge.plantuml.svek.image;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.FontParam;
import net.sourceforge.plantuml.Guillemet; import net.sourceforge.plantuml.Guillemet;
import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.ILeaf;
import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.cucadiagram.Stereotype;

View File

@ -35,13 +35,12 @@
*/ */
package net.sourceforge.plantuml.svek.image; package net.sourceforge.plantuml.svek.image;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.ColorParam;
import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.SkinParamUtils; import net.sourceforge.plantuml.SkinParamUtils;
import net.sourceforge.plantuml.UseStyle; import net.sourceforge.plantuml.UseStyle;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.ILeaf;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.style.PName; import net.sourceforge.plantuml.style.PName;

View File

@ -35,10 +35,9 @@
*/ */
package net.sourceforge.plantuml.svek.image; package net.sourceforge.plantuml.svek.image;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.ILeaf;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.svek.AbstractEntityImage; import net.sourceforge.plantuml.svek.AbstractEntityImage;

View File

@ -35,7 +35,6 @@
*/ */
package net.sourceforge.plantuml.svek.image; package net.sourceforge.plantuml.svek.image;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.EnumMap; import java.util.EnumMap;
import java.util.Map; import java.util.Map;
@ -44,6 +43,7 @@ import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.SkinParamUtils; import net.sourceforge.plantuml.SkinParamUtils;
import net.sourceforge.plantuml.UseStyle; import net.sourceforge.plantuml.UseStyle;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.ILeaf;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.style.PName; import net.sourceforge.plantuml.style.PName;

View File

@ -35,13 +35,12 @@
*/ */
package net.sourceforge.plantuml.svek.image; package net.sourceforge.plantuml.svek.image;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.ColorParam;
import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.SkinParamUtils; import net.sourceforge.plantuml.SkinParamUtils;
import net.sourceforge.plantuml.UseStyle; import net.sourceforge.plantuml.UseStyle;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.ILeaf;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.style.PName; import net.sourceforge.plantuml.style.PName;

View File

@ -35,13 +35,12 @@
*/ */
package net.sourceforge.plantuml.svek.image; package net.sourceforge.plantuml.svek.image;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.ColorParam;
import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.SkinParamUtils; import net.sourceforge.plantuml.SkinParamUtils;
import net.sourceforge.plantuml.UseStyle; import net.sourceforge.plantuml.UseStyle;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.ILeaf;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.style.PName; import net.sourceforge.plantuml.style.PName;

View File

@ -35,7 +35,6 @@
*/ */
package net.sourceforge.plantuml.svek.image; package net.sourceforge.plantuml.svek.image;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.geom.Rectangle2D; import java.awt.geom.Rectangle2D;
import java.util.EnumMap; import java.util.EnumMap;
import java.util.Map; import java.util.Map;
@ -50,6 +49,7 @@ import net.sourceforge.plantuml.LineParam;
import net.sourceforge.plantuml.SkinParamUtils; import net.sourceforge.plantuml.SkinParamUtils;
import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.Url;
import net.sourceforge.plantuml.UseStyle; import net.sourceforge.plantuml.UseStyle;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.creole.Stencil; import net.sourceforge.plantuml.creole.Stencil;
import net.sourceforge.plantuml.cucadiagram.EntityPortion; import net.sourceforge.plantuml.cucadiagram.EntityPortion;
import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.ILeaf;

View File

@ -35,14 +35,13 @@
*/ */
package net.sourceforge.plantuml.svek.image; package net.sourceforge.plantuml.svek.image;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.ColorParam;
import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.FontParam;
import net.sourceforge.plantuml.Guillemet; import net.sourceforge.plantuml.Guillemet;
import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.SkinParamUtils; import net.sourceforge.plantuml.SkinParamUtils;
import net.sourceforge.plantuml.UseStyle; import net.sourceforge.plantuml.UseStyle;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.cucadiagram.EntityPortion; import net.sourceforge.plantuml.cucadiagram.EntityPortion;
import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.ILeaf;

View File

@ -61,10 +61,10 @@ import net.sourceforge.plantuml.graphic.TextBlockUtils;
import net.sourceforge.plantuml.graphic.USymbols; import net.sourceforge.plantuml.graphic.USymbols;
import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.graphic.color.ColorType;
import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.graphic.color.Colors;
import net.sourceforge.plantuml.style.StyleSignature;
import net.sourceforge.plantuml.style.PName; import net.sourceforge.plantuml.style.PName;
import net.sourceforge.plantuml.style.SName; import net.sourceforge.plantuml.style.SName;
import net.sourceforge.plantuml.style.Style; import net.sourceforge.plantuml.style.Style;
import net.sourceforge.plantuml.style.StyleSignature;
import net.sourceforge.plantuml.style.StyleSignatureBasic; import net.sourceforge.plantuml.style.StyleSignatureBasic;
import net.sourceforge.plantuml.svek.AbstractEntityImage; import net.sourceforge.plantuml.svek.AbstractEntityImage;
import net.sourceforge.plantuml.svek.Cluster; import net.sourceforge.plantuml.svek.Cluster;

View File

@ -35,10 +35,9 @@
*/ */
package net.sourceforge.plantuml.svek.image; package net.sourceforge.plantuml.svek.image;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.ILeaf;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.svek.AbstractEntityImage; import net.sourceforge.plantuml.svek.AbstractEntityImage;

View File

@ -35,9 +35,6 @@
*/ */
package net.sourceforge.plantuml.svek.image; package net.sourceforge.plantuml.svek.image;
import java.util.EnumMap;
import java.util.Map;
import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.ColorParam;
import net.sourceforge.plantuml.CornerParam; import net.sourceforge.plantuml.CornerParam;
import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Dimension2DDouble;
@ -76,7 +73,6 @@ import net.sourceforge.plantuml.ugraphic.PlacementStrategyY1Y2;
import net.sourceforge.plantuml.ugraphic.Shadowable; import net.sourceforge.plantuml.ugraphic.Shadowable;
import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.UGraphicStencil; import net.sourceforge.plantuml.ugraphic.UGraphicStencil;
import net.sourceforge.plantuml.ugraphic.UGroupType;
import net.sourceforge.plantuml.ugraphic.ULayoutGroup; import net.sourceforge.plantuml.ugraphic.ULayoutGroup;
import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.URectangle;
import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UStroke;

View File

@ -35,7 +35,6 @@
*/ */
package net.sourceforge.plantuml.svek.image; package net.sourceforge.plantuml.svek.image;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.EnumMap; import java.util.EnumMap;
import java.util.Map; import java.util.Map;
@ -46,6 +45,7 @@ import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.SkinParamUtils; import net.sourceforge.plantuml.SkinParamUtils;
import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.Url;
import net.sourceforge.plantuml.UseStyle; import net.sourceforge.plantuml.UseStyle;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.ILeaf;
import net.sourceforge.plantuml.cucadiagram.LeafType; import net.sourceforge.plantuml.cucadiagram.LeafType;
import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.cucadiagram.Stereotype;

View File

@ -35,7 +35,6 @@
*/ */
package net.sourceforge.plantuml.svek.image; package net.sourceforge.plantuml.svek.image;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.geom.Point2D; import java.awt.geom.Point2D;
import java.util.List; import java.util.List;
@ -45,6 +44,7 @@ import net.sourceforge.plantuml.FontParam;
import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.SkinParamUtils; import net.sourceforge.plantuml.SkinParamUtils;
import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.Url;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.ILeaf;
import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.cucadiagram.Stereotype;
import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.FontConfiguration;

View File

@ -35,7 +35,6 @@
*/ */
package net.sourceforge.plantuml.svek.image; package net.sourceforge.plantuml.svek.image;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.Objects; import java.util.Objects;
import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Dimension2DDouble;
@ -44,6 +43,7 @@ import net.sourceforge.plantuml.Guillemet;
import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.SkinParamUtils; import net.sourceforge.plantuml.SkinParamUtils;
import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.Url;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.cucadiagram.BodyFactory; import net.sourceforge.plantuml.cucadiagram.BodyFactory;
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.cucadiagram.EntityPortion; import net.sourceforge.plantuml.cucadiagram.EntityPortion;

View File

@ -35,7 +35,6 @@
*/ */
package net.sourceforge.plantuml.svek.image; package net.sourceforge.plantuml.svek.image;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.geom.Line2D; import java.awt.geom.Line2D;
import java.awt.geom.Point2D; import java.awt.geom.Point2D;
import java.util.EnumMap; import java.util.EnumMap;
@ -55,6 +54,7 @@ import net.sourceforge.plantuml.SkinParamUtils;
import net.sourceforge.plantuml.UmlDiagramType; import net.sourceforge.plantuml.UmlDiagramType;
import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.Url;
import net.sourceforge.plantuml.UseStyle; import net.sourceforge.plantuml.UseStyle;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.creole.Stencil; import net.sourceforge.plantuml.creole.Stencil;
import net.sourceforge.plantuml.cucadiagram.BodyFactory; import net.sourceforge.plantuml.cucadiagram.BodyFactory;
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;

View File

@ -35,10 +35,9 @@
*/ */
package net.sourceforge.plantuml.svek.image; package net.sourceforge.plantuml.svek.image;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.AbstractTextBlock;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;

View File

@ -36,7 +36,6 @@
package net.sourceforge.plantuml.svek.image; package net.sourceforge.plantuml.svek.image;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.geom.Point2D; import java.awt.geom.Point2D;
import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.ColorParam;
@ -45,6 +44,7 @@ import net.sourceforge.plantuml.FontParam;
import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.SkinParamUtils; import net.sourceforge.plantuml.SkinParamUtils;
import net.sourceforge.plantuml.UseStyle; import net.sourceforge.plantuml.UseStyle;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.cucadiagram.EntityPosition; import net.sourceforge.plantuml.cucadiagram.EntityPosition;
import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.ILeaf;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;

View File

@ -35,14 +35,13 @@
*/ */
package net.sourceforge.plantuml.svek.image; package net.sourceforge.plantuml.svek.image;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.ColorParam;
import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.FontParam;
import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.SkinParamUtils; import net.sourceforge.plantuml.SkinParamUtils;
import net.sourceforge.plantuml.UseStyle; import net.sourceforge.plantuml.UseStyle;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.ILeaf;
import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.cucadiagram.Stereotype;

View File

@ -35,13 +35,13 @@
*/ */
package net.sourceforge.plantuml.svek.image; package net.sourceforge.plantuml.svek.image;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.Collections; import java.util.Collections;
import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.FontParam;
import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.UseStyle; import net.sourceforge.plantuml.UseStyle;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.creole.CreoleMode; import net.sourceforge.plantuml.creole.CreoleMode;
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.IEntity;

View File

@ -35,12 +35,11 @@
*/ */
package net.sourceforge.plantuml.svek.image; package net.sourceforge.plantuml.svek.image;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.SkinParamUtils; import net.sourceforge.plantuml.SkinParamUtils;
import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.Url;
import net.sourceforge.plantuml.UseStyle; import net.sourceforge.plantuml.UseStyle;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.cucadiagram.BodyFactory; import net.sourceforge.plantuml.cucadiagram.BodyFactory;
import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.ILeaf;
import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.cucadiagram.Stereotype;

View File

@ -35,7 +35,6 @@
*/ */
package net.sourceforge.plantuml.svek.image; package net.sourceforge.plantuml.svek.image;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.geom.Point2D; import java.awt.geom.Point2D;
import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.ColorParam;
@ -43,6 +42,7 @@ import net.sourceforge.plantuml.FontParam;
import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.SkinParamUtils; import net.sourceforge.plantuml.SkinParamUtils;
import net.sourceforge.plantuml.UseStyle; import net.sourceforge.plantuml.UseStyle;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.cucadiagram.EntityPosition; import net.sourceforge.plantuml.cucadiagram.EntityPosition;
import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.ILeaf;
import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.graphic.color.ColorType;

View File

@ -35,8 +35,6 @@
*/ */
package net.sourceforge.plantuml.svek.image; package net.sourceforge.plantuml.svek.image;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.ColorParam;
import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.FontParam;
import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.ISkinParam;
@ -44,6 +42,7 @@ import net.sourceforge.plantuml.LineConfigurable;
import net.sourceforge.plantuml.SkinParamUtils; import net.sourceforge.plantuml.SkinParamUtils;
import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.Url;
import net.sourceforge.plantuml.UseStyle; import net.sourceforge.plantuml.UseStyle;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.creole.CreoleMode; import net.sourceforge.plantuml.creole.CreoleMode;
import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.IEntity;
import net.sourceforge.plantuml.cucadiagram.Stereotype; import net.sourceforge.plantuml.cucadiagram.Stereotype;

View File

@ -35,11 +35,10 @@
*/ */
package net.sourceforge.plantuml.svek.image; package net.sourceforge.plantuml.svek.image;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.UseStyle; import net.sourceforge.plantuml.UseStyle;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.cucadiagram.IEntity;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UGraphic;

View File

@ -35,13 +35,12 @@
*/ */
package net.sourceforge.plantuml.svek.image; package net.sourceforge.plantuml.svek.image;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.ColorParam;
import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.SkinParamUtils; import net.sourceforge.plantuml.SkinParamUtils;
import net.sourceforge.plantuml.UseStyle; import net.sourceforge.plantuml.UseStyle;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.cucadiagram.ILeaf; import net.sourceforge.plantuml.cucadiagram.ILeaf;
import net.sourceforge.plantuml.cucadiagram.Rankdir; import net.sourceforge.plantuml.cucadiagram.Rankdir;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;

View File

@ -35,7 +35,6 @@
*/ */
package net.sourceforge.plantuml.svek.image; package net.sourceforge.plantuml.svek.image;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.geom.Point2D; import java.awt.geom.Point2D;
import java.awt.geom.Rectangle2D; import java.awt.geom.Rectangle2D;
import java.util.Map; import java.util.Map;
@ -48,6 +47,7 @@ import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.LineBreakStrategy; import net.sourceforge.plantuml.LineBreakStrategy;
import net.sourceforge.plantuml.UmlDiagramType; import net.sourceforge.plantuml.UmlDiagramType;
import net.sourceforge.plantuml.UseStyle; import net.sourceforge.plantuml.UseStyle;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.command.Position; import net.sourceforge.plantuml.command.Position;
import net.sourceforge.plantuml.cucadiagram.BodyFactory; import net.sourceforge.plantuml.cucadiagram.BodyFactory;
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;

View File

@ -64,10 +64,10 @@ import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.graphic.TextBlockUtils;
import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.graphic.color.ColorType;
import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.graphic.color.Colors;
import net.sourceforge.plantuml.style.StyleSignature;
import net.sourceforge.plantuml.style.PName; import net.sourceforge.plantuml.style.PName;
import net.sourceforge.plantuml.style.SName; import net.sourceforge.plantuml.style.SName;
import net.sourceforge.plantuml.style.Style; import net.sourceforge.plantuml.style.Style;
import net.sourceforge.plantuml.style.StyleSignature;
import net.sourceforge.plantuml.style.StyleSignatureBasic; import net.sourceforge.plantuml.style.StyleSignatureBasic;
import net.sourceforge.plantuml.svek.AbstractEntityImage; import net.sourceforge.plantuml.svek.AbstractEntityImage;
import net.sourceforge.plantuml.svek.ShapeType; import net.sourceforge.plantuml.svek.ShapeType;

View File

@ -37,11 +37,11 @@ package net.sourceforge.plantuml.svek.image;
import static net.sourceforge.plantuml.utils.ObjectUtils.instanceOfAny; import static net.sourceforge.plantuml.utils.ObjectUtils.instanceOfAny;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.geom.Point2D; import java.awt.geom.Point2D;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.graphic.UDrawable;
import net.sourceforge.plantuml.ugraphic.UBackground; import net.sourceforge.plantuml.ugraphic.UBackground;

View File

@ -35,11 +35,11 @@
*/ */
package net.sourceforge.plantuml.svek.image; package net.sourceforge.plantuml.svek.image;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.geom.Point2D; import java.awt.geom.Point2D;
import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.Direction; import net.sourceforge.plantuml.Direction;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.AbstractTextBlock;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlock;

View File

@ -35,7 +35,6 @@
*/ */
package net.sourceforge.plantuml.svg; package net.sourceforge.plantuml.svg;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.geom.PathIterator; import java.awt.geom.PathIterator;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
@ -45,9 +44,7 @@ import java.io.OutputStream;
import java.nio.charset.Charset; import java.nio.charset.Charset;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap; import java.util.HashMap;
import java.util.LinkedHashSet;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
import java.util.Map; import java.util.Map;
@ -71,6 +68,7 @@ import org.w3c.dom.Element;
import net.sourceforge.plantuml.FileUtils; import net.sourceforge.plantuml.FileUtils;
import net.sourceforge.plantuml.Log; import net.sourceforge.plantuml.Log;
import net.sourceforge.plantuml.SignatureUtils; import net.sourceforge.plantuml.SignatureUtils;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.code.Base64Coder; import net.sourceforge.plantuml.code.Base64Coder;
import net.sourceforge.plantuml.security.SImageIO; import net.sourceforge.plantuml.security.SImageIO;
import net.sourceforge.plantuml.security.SecurityUtils; import net.sourceforge.plantuml.security.SecurityUtils;
@ -895,8 +893,14 @@ public class SvgGraphics {
String svg = manageScale(image); String svg = manageScale(image);
final String svgHeader = "<svg height=\"" + (int) (image.getHeight() * scale) + "\" width=\"" final String svgHeader;
+ (int) (image.getWidth() * scale) + "\" xmlns=\"http://www.w3.org/2000/svg\" >"; if (image.containsXlink())
svgHeader = "<svg height=\"" + (int) (image.getHeight() * scale) + "\" width=\""
+ (int) (image.getWidth() * scale)
+ "\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xmlns=\"http://www.w3.org/2000/svg\" >";
else
svgHeader = "<svg height=\"" + (int) (image.getHeight() * scale) + "\" width=\""
+ (int) (image.getWidth() * scale) + "\" xmlns=\"http://www.w3.org/2000/svg\" >";
svg = svgHeader + svg.substring(5); svg = svgHeader + svg.substring(5);

View File

@ -54,9 +54,9 @@ public class ChangeState implements Comparable<ChangeState> {
private final Colors colors; private final Colors colors;
public ChangeState(TimeTick when, String comment, Colors colors, String... states) { public ChangeState(TimeTick when, String comment, Colors colors, String... states) {
if (states.length == 0) { if (states.length == 0)
throw new IllegalArgumentException(); throw new IllegalArgumentException();
}
this.when = when; this.when = when;
this.states = states; this.states = states;
this.comment = comment; this.comment = comment;
@ -84,28 +84,26 @@ public class ChangeState implements Comparable<ChangeState> {
} }
public final HColor getBackColor(ISkinParam skinParam, Style style) { public final HColor getBackColor(ISkinParam skinParam, Style style) {
if (colors == null || colors.getColor(ColorType.BACK) == null) { if (colors == null || colors.getColor(ColorType.BACK) == null)
if (UseStyle.useBetaStyle() == false)
return HColorUtils.COL_D7E0F2;
return style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet()); return style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet());
}
return colors.getColor(ColorType.BACK); return colors.getColor(ColorType.BACK);
} }
private final HColor getLineColor(ISkinParam skinParam, Style style) { private final HColor getLineColor(ISkinParam skinParam, Style style) {
if (colors == null || colors.getColor(ColorType.LINE) == null) { if (colors == null || colors.getColor(ColorType.LINE) == null)
if (UseStyle.useBetaStyle() == false)
return HColorUtils.COL_038048;
return style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet()); return style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet());
}
return colors.getColor(ColorType.LINE); return colors.getColor(ColorType.LINE);
} }
private UStroke getStroke(Style style) {
return style.getStroke();
}
public SymbolContext getContext(ISkinParam skinParam, Style style) { public SymbolContext getContext(ISkinParam skinParam, Style style) {
return new SymbolContext(getBackColor(skinParam, style), getLineColor(skinParam, style)) return new SymbolContext(getBackColor(skinParam, style), getLineColor(skinParam, style))
.withStroke(new UStroke(1.5)); .withStroke(getStroke(style));
} }
public final boolean isBlank() { public final boolean isBlank() {

View File

@ -34,11 +34,10 @@
*/ */
package net.sourceforge.plantuml.timingdiagram; package net.sourceforge.plantuml.timingdiagram;
import net.sourceforge.plantuml.FontParam;
import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.UseStyle;
import net.sourceforge.plantuml.command.Position; import net.sourceforge.plantuml.command.Position;
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.cucadiagram.Stereotype;
import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HorizontalAlignment;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
@ -49,10 +48,10 @@ import net.sourceforge.plantuml.graphic.color.Colors;
import net.sourceforge.plantuml.style.PName; import net.sourceforge.plantuml.style.PName;
import net.sourceforge.plantuml.style.SName; import net.sourceforge.plantuml.style.SName;
import net.sourceforge.plantuml.style.Style; import net.sourceforge.plantuml.style.Style;
import net.sourceforge.plantuml.style.StyleSignature;
import net.sourceforge.plantuml.style.StyleSignatureBasic; import net.sourceforge.plantuml.style.StyleSignatureBasic;
import net.sourceforge.plantuml.ugraphic.UStroke; import net.sourceforge.plantuml.ugraphic.UStroke;
import net.sourceforge.plantuml.ugraphic.color.HColor; import net.sourceforge.plantuml.ugraphic.color.HColor;
import net.sourceforge.plantuml.ugraphic.color.HColorUtils;
public abstract class Player implements TimeProjected { public abstract class Player implements TimeProjected {
@ -61,8 +60,10 @@ public abstract class Player implements TimeProjected {
private final boolean compact; private final boolean compact;
private final Display title; private final Display title;
protected int suggestedHeight; protected int suggestedHeight;
protected final Stereotype stereotype;
public Player(String title, ISkinParam skinParam, TimingRuler ruler, boolean compact) { public Player(String title, ISkinParam skinParam, TimingRuler ruler, boolean compact, Stereotype stereotype) {
this.stereotype = stereotype;
this.skinParam = skinParam; this.skinParam = skinParam;
this.compact = compact; this.compact = compact;
this.ruler = ruler; this.ruler = ruler;
@ -73,23 +74,15 @@ public abstract class Player implements TimeProjected {
return compact; return compact;
} }
protected abstract StyleSignatureBasic getStyleSignature(); protected abstract StyleSignature getStyleSignature();
protected abstract SymbolContext getContextLegacy();
// private StyleSignature getStyleSignature() {
// return StyleSignature.of(SName.root, SName.element, SName.timingDiagram);
// }
final protected Style getStyle() { final protected Style getStyle() {
return getStyleSignature().getMergedStyle(skinParam.getCurrentStyleBuilder()); return getStyleSignature().getMergedStyle(skinParam.getCurrentStyleBuilder());
} }
final protected FontConfiguration getFontConfiguration() { final protected FontConfiguration getFontConfiguration() {
if (UseStyle.useBetaStyle() == false) return FontConfiguration.create(skinParam, StyleSignatureBasic
return FontConfiguration.create(skinParam, FontParam.TIMING, null); .of(SName.root, SName.element, SName.timingDiagram).getMergedStyle(skinParam.getCurrentStyleBuilder()));
return FontConfiguration.create(skinParam, StyleSignatureBasic.of(SName.root, SName.element, SName.timingDiagram)
.getMergedStyle(skinParam.getCurrentStyleBuilder()));
} }
final protected UStroke getStroke() { final protected UStroke getStroke() {
@ -98,8 +91,6 @@ public abstract class Player implements TimeProjected {
} }
final protected SymbolContext getContext() { final protected SymbolContext getContext() {
if (UseStyle.useBetaStyle() == false)
return getContextLegacy();
final Style style = getStyleSignature().getMergedStyle(skinParam.getCurrentStyleBuilder()); final Style style = getStyleSignature().getMergedStyle(skinParam.getCurrentStyleBuilder());
final HColor lineColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(), final HColor lineColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(),

View File

@ -34,7 +34,6 @@
*/ */
package net.sourceforge.plantuml.timingdiagram; package net.sourceforge.plantuml.timingdiagram;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.geom.Point2D; import java.awt.geom.Point2D;
import java.util.Map; import java.util.Map;
import java.util.Map.Entry; import java.util.Map.Entry;
@ -43,12 +42,12 @@ import java.util.TreeMap;
import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.command.Position; import net.sourceforge.plantuml.command.Position;
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.AbstractTextBlock;
import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HorizontalAlignment;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.SymbolContext;
import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.graphic.UDrawable;
import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.graphic.color.Colors;
@ -57,9 +56,7 @@ import net.sourceforge.plantuml.style.StyleSignatureBasic;
import net.sourceforge.plantuml.timingdiagram.graphic.IntricatedPoint; import net.sourceforge.plantuml.timingdiagram.graphic.IntricatedPoint;
import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.ULine;
import net.sourceforge.plantuml.ugraphic.UStroke;
import net.sourceforge.plantuml.ugraphic.UTranslate; import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.HColorUtils;
public class PlayerAnalog extends Player { public class PlayerAnalog extends Player {
@ -71,7 +68,7 @@ public class PlayerAnalog extends Player {
private Integer ticksEvery; private Integer ticksEvery;
public PlayerAnalog(String code, ISkinParam skinParam, TimingRuler ruler, boolean compact) { public PlayerAnalog(String code, ISkinParam skinParam, TimingRuler ruler, boolean compact) {
super(code, skinParam, ruler, compact); super(code, skinParam, ruler, compact, null);
this.suggestedHeight = 100; this.suggestedHeight = 100;
} }
@ -100,11 +97,6 @@ public class PlayerAnalog extends Player {
return suggestedHeight; return suggestedHeight;
} }
@Override
protected SymbolContext getContextLegacy() {
return new SymbolContext(HColorUtils.COL_D7E0F2, HColorUtils.COL_038048).withStroke(new UStroke(1.5));
}
public IntricatedPoint getTimeProjection(StringBounder stringBounder, TimeTick tick) { public IntricatedPoint getTimeProjection(StringBounder stringBounder, TimeTick tick) {
final double x = ruler.getPosInPixel(tick); final double x = ruler.getPosInPixel(tick);
final double value = getValueAt(tick); final double value = getValueAt(tick);

View File

@ -34,7 +34,6 @@
*/ */
package net.sourceforge.plantuml.timingdiagram; package net.sourceforge.plantuml.timingdiagram;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.geom.Point2D; import java.awt.geom.Point2D;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -46,27 +45,24 @@ import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.FontParam;
import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.UseStyle; import net.sourceforge.plantuml.UseStyle;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.command.Position; import net.sourceforge.plantuml.command.Position;
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.cucadiagram.Stereotype;
import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.AbstractTextBlock;
import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HorizontalAlignment;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.SymbolContext;
import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.graphic.UDrawable;
import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.graphic.color.Colors;
import net.sourceforge.plantuml.style.PName;
import net.sourceforge.plantuml.style.SName; import net.sourceforge.plantuml.style.SName;
import net.sourceforge.plantuml.style.Style; import net.sourceforge.plantuml.style.StyleSignature;
import net.sourceforge.plantuml.style.StyleSignatureBasic; import net.sourceforge.plantuml.style.StyleSignatureBasic;
import net.sourceforge.plantuml.timingdiagram.graphic.IntricatedPoint; import net.sourceforge.plantuml.timingdiagram.graphic.IntricatedPoint;
import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.ULine;
import net.sourceforge.plantuml.ugraphic.UStroke;
import net.sourceforge.plantuml.ugraphic.UTranslate; import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.HColor;
import net.sourceforge.plantuml.ugraphic.color.HColorUtils;
public class PlayerBinary extends Player { public class PlayerBinary extends Player {
@ -76,11 +72,9 @@ public class PlayerBinary extends Player {
private final List<TimeConstraint> constraints = new ArrayList<>(); private final List<TimeConstraint> constraints = new ArrayList<>();
private final SortedMap<TimeTick, ChangeState> values = new TreeMap<>(); private final SortedMap<TimeTick, ChangeState> values = new TreeMap<>();
private ChangeState initialState; private ChangeState initialState;
private final Style style;
public PlayerBinary(String code, ISkinParam skinParam, TimingRuler ruler, boolean compact) { public PlayerBinary(String code, ISkinParam skinParam, TimingRuler ruler, boolean compact, Stereotype stereotype) {
super(code, skinParam, ruler, compact); super(code, skinParam, ruler, compact, stereotype);
this.style = getStyleSignature().getMergedStyle(skinParam.getCurrentStyleBuilder());
this.suggestedHeight = 30; this.suggestedHeight = 30;
} }
@ -93,23 +87,8 @@ public class PlayerBinary extends Player {
} }
@Override @Override
protected StyleSignatureBasic getStyleSignature() { protected StyleSignature getStyleSignature() {
return StyleSignatureBasic.of(SName.root, SName.element, SName.timingDiagram, SName.binary); return StyleSignatureBasic.of(SName.root, SName.element, SName.timingDiagram, SName.binary).withTOBECHANGED(stereotype);
}
@Override
protected SymbolContext getContextLegacy() {
if (UseStyle.useBetaStyle() == false)
return new SymbolContext(HColorUtils.COL_D7E0F2, HColorUtils.COL_038048).withStroke(new UStroke(2));
final HColor lineColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(),
skinParam.getIHtmlColorSet());
final HColor backgroundColor = style.value(PName.BackGroundColor).asColor(skinParam.getThemeStyle(),
skinParam.getIHtmlColorSet());
return new SymbolContext(backgroundColor, lineColor).withStroke(getStroke());
} }
public IntricatedPoint getTimeProjection(StringBounder stringBounder, TimeTick tick) { public IntricatedPoint getTimeProjection(StringBounder stringBounder, TimeTick tick) {

View File

@ -34,32 +34,25 @@
*/ */
package net.sourceforge.plantuml.timingdiagram; package net.sourceforge.plantuml.timingdiagram;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.math.BigDecimal; import java.math.BigDecimal;
import net.sourceforge.plantuml.FontParam;
import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.UseStyle; import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.command.Position; import net.sourceforge.plantuml.command.Position;
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.AbstractTextBlock;
import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.SymbolContext;
import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.graphic.TextBlockUtils;
import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.graphic.UDrawable;
import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.graphic.color.Colors;
import net.sourceforge.plantuml.style.SName; import net.sourceforge.plantuml.style.SName;
import net.sourceforge.plantuml.style.Style;
import net.sourceforge.plantuml.style.StyleSignatureBasic; import net.sourceforge.plantuml.style.StyleSignatureBasic;
import net.sourceforge.plantuml.timingdiagram.graphic.IntricatedPoint; import net.sourceforge.plantuml.timingdiagram.graphic.IntricatedPoint;
import net.sourceforge.plantuml.timingdiagram.graphic.PlayerFrame; import net.sourceforge.plantuml.timingdiagram.graphic.PlayerFrame;
import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.ULine; import net.sourceforge.plantuml.ugraphic.ULine;
import net.sourceforge.plantuml.ugraphic.UStroke;
import net.sourceforge.plantuml.ugraphic.UTranslate; import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.HColorUtils;
public class PlayerClock extends Player { public class PlayerClock extends Player {
@ -71,7 +64,7 @@ public class PlayerClock extends Player {
public PlayerClock(String title, ISkinParam skinParam, TimingRuler ruler, int period, int pulse, int offset, public PlayerClock(String title, ISkinParam skinParam, TimingRuler ruler, int period, int pulse, int offset,
boolean compact) { boolean compact) {
super(title, skinParam, ruler, compact); super(title, skinParam, ruler, compact, null);
this.displayTitle = title.length() > 0; this.displayTitle = title.length() > 0;
this.period = period; this.period = period;
this.pulse = pulse; this.pulse = pulse;
@ -93,11 +86,6 @@ public class PlayerClock extends Player {
return 0; return 0;
} }
@Override
protected SymbolContext getContextLegacy() {
return new SymbolContext(HColorUtils.COL_D7E0F2, HColorUtils.COL_038048).withStroke(new UStroke(1.5));
}
protected StyleSignatureBasic getStyleSignature() { protected StyleSignatureBasic getStyleSignature() {
return StyleSignatureBasic.of(SName.root, SName.element, SName.timingDiagram, SName.clock); return StyleSignatureBasic.of(SName.root, SName.element, SName.timingDiagram, SName.clock);
} }

View File

@ -34,7 +34,6 @@
*/ */
package net.sourceforge.plantuml.timingdiagram; package net.sourceforge.plantuml.timingdiagram;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
@ -44,16 +43,18 @@ import java.util.TreeSet;
import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.UseStyle; import net.sourceforge.plantuml.UseStyle;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.command.Position; import net.sourceforge.plantuml.command.Position;
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.cucadiagram.Stereotype;
import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.AbstractTextBlock;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.SymbolContext;
import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.graphic.UDrawable; import net.sourceforge.plantuml.graphic.UDrawable;
import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.graphic.color.Colors;
import net.sourceforge.plantuml.style.SName; import net.sourceforge.plantuml.style.SName;
import net.sourceforge.plantuml.style.Style; import net.sourceforge.plantuml.style.Style;
import net.sourceforge.plantuml.style.StyleSignature;
import net.sourceforge.plantuml.style.StyleSignatureBasic; import net.sourceforge.plantuml.style.StyleSignatureBasic;
import net.sourceforge.plantuml.timingdiagram.graphic.Histogram; import net.sourceforge.plantuml.timingdiagram.graphic.Histogram;
import net.sourceforge.plantuml.timingdiagram.graphic.IntricatedPoint; import net.sourceforge.plantuml.timingdiagram.graphic.IntricatedPoint;
@ -75,27 +76,22 @@ public final class PlayerRobustConcise extends Player {
private PDrawing cached; private PDrawing cached;
private Colors initialColors; private Colors initialColors;
public PlayerRobustConcise(TimingStyle type, String full, ISkinParam skinParam, TimingRuler ruler, public PlayerRobustConcise(TimingStyle type, String full, ISkinParam skinParam, TimingRuler ruler, boolean compact,
boolean compact) { Stereotype stereotype) {
super(full, skinParam, ruler, compact); super(full, skinParam, ruler, compact, stereotype);
this.type = type; this.type = type;
this.suggestedHeight = 0; this.suggestedHeight = 0;
} }
@Override @Override
protected StyleSignatureBasic getStyleSignature() { protected StyleSignature getStyleSignature() {
if (type == TimingStyle.CONCISE) if (type == TimingStyle.CONCISE)
return StyleSignatureBasic.of(SName.root, SName.element, SName.timingDiagram, SName.concise); return StyleSignatureBasic.of(SName.root, SName.element, SName.timingDiagram, SName.concise).withTOBECHANGED(stereotype);
if (type == TimingStyle.ROBUST) if (type == TimingStyle.ROBUST)
return StyleSignatureBasic.of(SName.root, SName.element, SName.timingDiagram, SName.robust); return StyleSignatureBasic.of(SName.root, SName.element, SName.timingDiagram, SName.robust).withTOBECHANGED(stereotype);
throw new IllegalStateException(); throw new IllegalStateException();
} }
@Override
protected SymbolContext getContextLegacy() {
throw new UnsupportedOperationException();
}
private PDrawing buildPDrawing() { private PDrawing buildPDrawing() {
final Style style = getStyleSignature().getMergedStyle(skinParam.getCurrentStyleBuilder()); final Style style = getStyleSignature().getMergedStyle(skinParam.getCurrentStyleBuilder());
if (type == TimingStyle.CONCISE) if (type == TimingStyle.CONCISE)

View File

@ -34,13 +34,13 @@
*/ */
package net.sourceforge.plantuml.timingdiagram; package net.sourceforge.plantuml.timingdiagram;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.geom.Point2D; import java.awt.geom.Point2D;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.UseStyle; import net.sourceforge.plantuml.UseStyle;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HorizontalAlignment;

View File

@ -34,7 +34,6 @@
*/ */
package net.sourceforge.plantuml.timingdiagram; package net.sourceforge.plantuml.timingdiagram;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.geom.Rectangle2D; import java.awt.geom.Rectangle2D;
import java.io.IOException; import java.io.IOException;
import java.io.OutputStream; import java.io.OutputStream;
@ -51,11 +50,13 @@ import net.sourceforge.plantuml.UmlDiagram;
import net.sourceforge.plantuml.UmlDiagramType; import net.sourceforge.plantuml.UmlDiagramType;
import net.sourceforge.plantuml.UseStyle; import net.sourceforge.plantuml.UseStyle;
import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.api.ThemeStyle;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.command.CommandExecutionResult; import net.sourceforge.plantuml.command.CommandExecutionResult;
import net.sourceforge.plantuml.core.DiagramDescription; import net.sourceforge.plantuml.core.DiagramDescription;
import net.sourceforge.plantuml.core.ImageData; import net.sourceforge.plantuml.core.ImageData;
import net.sourceforge.plantuml.core.UmlSource; import net.sourceforge.plantuml.core.UmlSource;
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.cucadiagram.Stereotype;
import net.sourceforge.plantuml.graphic.InnerStrategy; import net.sourceforge.plantuml.graphic.InnerStrategy;
import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlock;
@ -296,8 +297,10 @@ public class TimingDiagram extends UmlDiagram implements Clocks {
throw new IllegalArgumentException(); throw new IllegalArgumentException();
} }
public CommandExecutionResult createRobustConcise(String code, String full, TimingStyle type, boolean compact) { public CommandExecutionResult createRobustConcise(String code, String full, TimingStyle type, boolean compact,
final Player player = new PlayerRobustConcise(type, full, getSkinParam(), ruler, compactByDefault || compact); Stereotype stereotype) {
final Player player = new PlayerRobustConcise(type, full, getSkinParam(), ruler, compactByDefault || compact,
stereotype);
players.put(code, player); players.put(code, player);
lastPlayer = player; lastPlayer = player;
return CommandExecutionResult.ok(); return CommandExecutionResult.ok();
@ -320,8 +323,8 @@ public class TimingDiagram extends UmlDiagram implements Clocks {
return player; return player;
} }
public CommandExecutionResult createBinary(String code, String full, boolean compact) { public CommandExecutionResult createBinary(String code, String full, boolean compact, Stereotype stereotype) {
final Player player = new PlayerBinary(full, getSkinParam(), ruler, compactByDefault); final Player player = new PlayerBinary(full, getSkinParam(), ruler, compactByDefault, stereotype);
players.put(code, player); players.put(code, player);
return CommandExecutionResult.ok(); return CommandExecutionResult.ok();
} }

View File

@ -34,7 +34,6 @@
*/ */
package net.sourceforge.plantuml.timingdiagram; package net.sourceforge.plantuml.timingdiagram;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Collection; import java.util.Collection;
import java.util.Comparator; import java.util.Comparator;
@ -46,6 +45,7 @@ import net.sourceforge.plantuml.FontParam;
import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.UseStyle; import net.sourceforge.plantuml.UseStyle;
import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.api.ThemeStyle;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.HorizontalAlignment;
@ -61,7 +61,6 @@ import net.sourceforge.plantuml.ugraphic.UStroke;
import net.sourceforge.plantuml.ugraphic.UTranslate; import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.color.HColor; import net.sourceforge.plantuml.ugraphic.color.HColor;
import net.sourceforge.plantuml.ugraphic.color.HColorSet; import net.sourceforge.plantuml.ugraphic.color.HColorSet;
import net.sourceforge.plantuml.ugraphic.color.HColorSimple;
import net.sourceforge.plantuml.ugraphic.color.HColorUtils; import net.sourceforge.plantuml.ugraphic.color.HColorUtils;
public class TimingRuler { public class TimingRuler {

View File

@ -43,6 +43,7 @@ import net.sourceforge.plantuml.command.regex.RegexConcat;
import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexLeaf;
import net.sourceforge.plantuml.command.regex.RegexOptional; import net.sourceforge.plantuml.command.regex.RegexOptional;
import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.command.regex.RegexResult;
import net.sourceforge.plantuml.cucadiagram.Stereotype;
import net.sourceforge.plantuml.timingdiagram.TimingDiagram; import net.sourceforge.plantuml.timingdiagram.TimingDiagram;
public class CommandBinary extends SingleLineCommand2<TimingDiagram> { public class CommandBinary extends SingleLineCommand2<TimingDiagram> {
@ -60,10 +61,16 @@ public class CommandBinary extends SingleLineCommand2<TimingDiagram> {
new RegexLeaf("binary"), // new RegexLeaf("binary"), //
RegexLeaf.spaceOneOrMore(), // RegexLeaf.spaceOneOrMore(), //
new RegexLeaf("FULL", "[%g]([^%g]+)[%g]"), // new RegexLeaf("FULL", "[%g]([^%g]+)[%g]"), //
RegexLeaf.spaceZeroOrMore(), //
new RegexLeaf("STEREOTYPE", "(\\<\\<.*\\>\\>)?"), //
RegexLeaf.spaceOneOrMore(), // RegexLeaf.spaceOneOrMore(), //
new RegexLeaf("as"), // new RegexLeaf("as"), //
RegexLeaf.spaceOneOrMore(), // RegexLeaf.spaceOneOrMore(), //
new RegexLeaf("CODE", "([%pLN_.@]+)"), RegexLeaf.end()); new RegexLeaf("CODE", "([%pLN_.@]+)"), //
RegexLeaf.spaceZeroOrMore(), //
new RegexLeaf("STEREOTYPE2", "(\\<\\<.*\\>\\>)?"), //
RegexLeaf.spaceZeroOrMore(), //
RegexLeaf.end());
} }
@Override @Override
@ -71,7 +78,14 @@ public class CommandBinary extends SingleLineCommand2<TimingDiagram> {
final String compact = arg.get("COMPACT", 0); final String compact = arg.get("COMPACT", 0);
final String code = arg.get("CODE", 0); final String code = arg.get("CODE", 0);
final String full = arg.get("FULL", 0); final String full = arg.get("FULL", 0);
return diagram.createBinary(code, full, compact != null);
Stereotype stereotype = null;
if (arg.get("STEREOTYPE", 0) != null)
stereotype = Stereotype.build(arg.get("STEREOTYPE", 0));
else if (arg.get("STEREOTYPE2", 0) != null)
stereotype = Stereotype.build(arg.get("STEREOTYPE2", 0));
return diagram.createBinary(code, full, compact != null, stereotype);
} }
} }

View File

@ -43,6 +43,7 @@ import net.sourceforge.plantuml.command.regex.RegexConcat;
import net.sourceforge.plantuml.command.regex.RegexLeaf; import net.sourceforge.plantuml.command.regex.RegexLeaf;
import net.sourceforge.plantuml.command.regex.RegexOptional; import net.sourceforge.plantuml.command.regex.RegexOptional;
import net.sourceforge.plantuml.command.regex.RegexResult; import net.sourceforge.plantuml.command.regex.RegexResult;
import net.sourceforge.plantuml.cucadiagram.Stereotype;
import net.sourceforge.plantuml.timingdiagram.TimingDiagram; import net.sourceforge.plantuml.timingdiagram.TimingDiagram;
import net.sourceforge.plantuml.timingdiagram.TimingStyle; import net.sourceforge.plantuml.timingdiagram.TimingStyle;
@ -64,9 +65,14 @@ public class CommandRobustConcise extends SingleLineCommand2<TimingDiagram> {
new RegexConcat( // new RegexConcat( //
new RegexLeaf("FULL", "[%g]([^%g]+)[%g]"), // new RegexLeaf("FULL", "[%g]([^%g]+)[%g]"), //
RegexLeaf.spaceOneOrMore(), // RegexLeaf.spaceOneOrMore(), //
new RegexLeaf("STEREOTYPE", "(\\<\\<.*\\>\\>)?"), //
RegexLeaf.spaceZeroOrMore(), //
new RegexLeaf("as"), // new RegexLeaf("as"), //
RegexLeaf.spaceOneOrMore())), // RegexLeaf.spaceOneOrMore())), //
new RegexLeaf("CODE", "([%pLN_.@]+)"), // new RegexLeaf("CODE", "([%pLN_.@]+)"), //
RegexLeaf.spaceZeroOrMore(), //
new RegexLeaf("STEREOTYPE2", "(\\<\\<.*\\>\\>)?"), //
RegexLeaf.spaceZeroOrMore(), //
RegexLeaf.end()); RegexLeaf.end());
} }
@ -75,11 +81,17 @@ public class CommandRobustConcise extends SingleLineCommand2<TimingDiagram> {
final String compact = arg.get("COMPACT", 0); final String compact = arg.get("COMPACT", 0);
final String code = arg.get("CODE", 0); final String code = arg.get("CODE", 0);
String full = arg.get("FULL", 0); String full = arg.get("FULL", 0);
if (full == null) { if (full == null)
full = code; full = code;
}
Stereotype stereotype = null;
if (arg.get("STEREOTYPE", 0) != null)
stereotype = Stereotype.build(arg.get("STEREOTYPE", 0));
else if (arg.get("STEREOTYPE2", 0) != null)
stereotype = Stereotype.build(arg.get("STEREOTYPE2", 0));
final TimingStyle type = TimingStyle.valueOf(arg.get("TYPE", 0).toUpperCase()); final TimingStyle type = TimingStyle.valueOf(arg.get("TYPE", 0).toUpperCase());
return diagram.createRobustConcise(code, full, type, compact != null); return diagram.createRobustConcise(code, full, type, compact != null, stereotype);
} }
} }

View File

@ -34,10 +34,9 @@
*/ */
package net.sourceforge.plantuml.timingdiagram.graphic; package net.sourceforge.plantuml.timingdiagram.graphic;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.UseStyle; import net.sourceforge.plantuml.UseStyle;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.style.PName; import net.sourceforge.plantuml.style.PName;
import net.sourceforge.plantuml.style.SName; import net.sourceforge.plantuml.style.SName;

View File

@ -34,7 +34,6 @@
*/ */
package net.sourceforge.plantuml.timingdiagram.graphic; package net.sourceforge.plantuml.timingdiagram.graphic;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.geom.Point2D; import java.awt.geom.Point2D;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -43,6 +42,7 @@ import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.FontParam;
import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.UseStyle; import net.sourceforge.plantuml.UseStyle;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.command.Position; import net.sourceforge.plantuml.command.Position;
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.AbstractTextBlock;

View File

@ -34,10 +34,10 @@
*/ */
package net.sourceforge.plantuml.timingdiagram.graphic; package net.sourceforge.plantuml.timingdiagram.graphic;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import java.awt.geom.Point2D; import java.awt.geom.Point2D;
import net.sourceforge.plantuml.ISkinSimple; import net.sourceforge.plantuml.ISkinSimple;
import net.sourceforge.plantuml.awt.geom.Dimension2D;
import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.cucadiagram.WithLinkType; import net.sourceforge.plantuml.cucadiagram.WithLinkType;
import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.FontConfiguration;

View File

@ -55,6 +55,10 @@ public class UImageSvg implements UShape {
return SignatureUtils.getMD5Hex(svg); return SignatureUtils.getMD5Hex(svg);
} }
public boolean containsXlink() {
return svg.contains("xmlns:xlink=\"http://www.w3.org/1999/xlink\"");
}
public String getSvg(boolean raw) { public String getSvg(boolean raw) {
String result = svg; String result = svg;
if (raw) if (raw)

View File

@ -119,17 +119,17 @@ public class HColorUtils {
} }
public static HColor noGradient(HColor color) { public static HColor noGradient(HColor color) {
if (color instanceof HColorGradient) { if (color instanceof HColorGradient)
return ((HColorGradient) color).getColor1(); return ((HColorGradient) color).getColor1();
}
return color; return color;
} }
public static UChange changeBack(UGraphic ug) { public static UChange changeBack(UGraphic ug) {
final HColor color = ug.getParam().getColor(); final HColor color = ug.getParam().getColor();
if (color == null) { if (color == null)
return new HColorNone().bg(); return new HColorNone().bg();
}
return color.bg(); return color.bg();
} }
@ -140,28 +140,28 @@ public class HColorUtils {
} }
public static boolean isTransparent(HColor back) { public static boolean isTransparent(HColor back) {
if (back == TRANSPARENT) { if (back == TRANSPARENT)
return true; return true;
}
if (back instanceof HColorBackground && ((HColorBackground) back).getBack() == TRANSPARENT) { if (back instanceof HColorBackground && ((HColorBackground) back).getBack() == TRANSPARENT)
return true; return true;
}
if (back instanceof HColorSimple && ((HColorSimple) back).isTransparent()) { if (back instanceof HColorSimple && ((HColorSimple) back).isTransparent())
return true; return true;
}
return false; return false;
} }
public static HColor unlinear(HColor color1, HColor color2, int completion) { public static HColor unlinear(HColor color1, HColor color2, int completion) {
if (completion == 0) { if (completion == 0)
return color1; return color1;
}
if (completion == 100) { if (completion == 100)
return color2; return color2;
}
if (color1 instanceof HColorSimple && color2 instanceof HColorSimple) { if (color1 instanceof HColorSimple && color2 instanceof HColorSimple)
return HColorSimple.unlinear((HColorSimple) color1, (HColorSimple) color2, completion); return HColorSimple.unlinear((HColorSimple) color1, (HColorSimple) color2, completion);
}
return color1; return color1;
} }

View File

@ -75,11 +75,15 @@ public class UPathHand {
final double y = segment.getCoord()[1]; final double y = segment.getCoord()[1];
final HandJiggle jiggle = new HandJiggle(last.getX(), last.getY(), defaultVariation, rnd); final HandJiggle jiggle = new HandJiggle(last.getX(), last.getY(), defaultVariation, rnd);
jiggle.lineTo(x, y); jiggle.lineTo(x, y);
for (USegment seg2 : jiggle.toUPath()) { for (USegment seg2 : jiggle.toUPath())
if (seg2.getSegmentType() == USegmentType.SEG_LINETO) { if (seg2.getSegmentType() == USegmentType.SEG_LINETO)
result.lineTo(seg2.getCoord()[0], seg2.getCoord()[1]); result.lineTo(seg2.getCoord()[0], seg2.getCoord()[1]);
}
} last = new Point2D.Double(x, y);
} else if (type == USegmentType.SEG_ARCTO) {
final double x = segment.getCoord()[5];
final double y = segment.getCoord()[6];
result.lineTo(x, y);
last = new Point2D.Double(x, y); last = new Point2D.Double(x, y);
} else { } else {
this.path = source; this.path = source;

View File

@ -44,7 +44,7 @@ public class Version {
private static final int MAJOR_SEPARATOR = 1000000; private static final int MAJOR_SEPARATOR = 1000000;
public static int version() { public static int version() {
return 1202204; return 1202205;
} }
public static int versionPatched() { public static int versionPatched() {
@ -80,7 +80,7 @@ public class Version {
} }
public static int beta() { public static int beta() {
final int beta = 1; final int beta = 0;
return beta; return beta;
} }
@ -93,7 +93,7 @@ public class Version {
} }
public static long compileTime() { public static long compileTime() {
return 1649510957985L; return 1651316152000L;
} }
public static String compileTimeString() { public static String compileTimeString() {

BIN
stdlib/classy-abx.repx Normal file

Binary file not shown.

BIN
stdlib/classy-c4-abx.repx Normal file

Binary file not shown.

View File

@ -0,0 +1 @@
;

1
stdlib/classy-dex.repx Normal file
View File

@ -0,0 +1 @@
;

BIN
stdlib/domainstory-abx.repx Normal file

Binary file not shown.

View File

@ -0,0 +1 @@
;

View File

@ -1,14 +1,17 @@
azure archimate
aws aws
awslib awslib
azure
c4
classy
classy-c4
cloudinsight cloudinsight
cloudogu cloudogu
tupadr3 domainstory
material elastic
office
c4
osa
kubernetes kubernetes
logos logos
elastic material
archimate office
osa
tupadr3