From 285c21492fe7611ab9d902361c7819f4f25d72e4 Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Wed, 22 Jun 2022 09:30:15 +0200 Subject: [PATCH] Import version 1.2022.6 --- .../plantuml/activitydiagram3/ftile/Snake.java | 4 ++-- .../sourceforge/plantuml/graphic/Rainbow.java | 17 +++++++++++++---- .../plantuml/style/FromSkinparamToStyle.java | 5 ++--- src/net/sourceforge/plantuml/style/PName.java | 1 + .../sourceforge/plantuml/version/Version.java | 6 +++--- 5 files changed, 21 insertions(+), 12 deletions(-) diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/Snake.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/Snake.java index 08767b436..054243b4b 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/Snake.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/Snake.java @@ -321,9 +321,9 @@ public class Snake implements UShape { if (same(this.getLast(), other.getFirst())) { final UPolygon oneOf = other.endDecoration == null ? endDecoration : other.endDecoration; - if (this.startDecoration != null || other.startDecoration != null) { + if (this.startDecoration != null || other.startDecoration != null) throw new UnsupportedOperationException("Not yet coded: to be done"); - } + final ArrayList mergeTexts = new ArrayList(this.texts); mergeTexts.addAll(other.texts); final Snake result = new Snake(skinParam, null, color, oneOf, this.worm.merge(other.worm, strategy), diff --git a/src/net/sourceforge/plantuml/graphic/Rainbow.java b/src/net/sourceforge/plantuml/graphic/Rainbow.java index 76aabc9fe..5e2cfba83 100644 --- a/src/net/sourceforge/plantuml/graphic/Rainbow.java +++ b/src/net/sourceforge/plantuml/graphic/Rainbow.java @@ -42,17 +42,18 @@ import java.util.Objects; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.api.ThemeStyle; -import net.sourceforge.plantuml.skin.rose.Rose; import net.sourceforge.plantuml.style.PName; import net.sourceforge.plantuml.style.Style; +import net.sourceforge.plantuml.style.Value; +import net.sourceforge.plantuml.style.ValueNull; +import net.sourceforge.plantuml.ugraphic.color.ColorUtils; import net.sourceforge.plantuml.ugraphic.color.HColor; import net.sourceforge.plantuml.ugraphic.color.HColorSet; +import net.sourceforge.plantuml.ugraphic.color.HColorUtils; import net.sourceforge.plantuml.ugraphic.color.NoSuchColorException; public class Rainbow { - private final static Rose rose = new Rose(); - private final List colors = new ArrayList<>(); private final int colorArrowSeparationSpace; @@ -83,7 +84,15 @@ public class Rainbow { public static Rainbow build(Style style, HColorSet set, ThemeStyle themeStyle) { final HColor color = style.value(PName.LineColor).asColor(themeStyle, set); - return fromColor(color, null); + final Value head = style.value(PName.HeadColor); + HColor colorHead; + if (head instanceof ValueNull) + colorHead = color; + else + colorHead = head.asColor(themeStyle, set); + if (colorHead == null) + colorHead = HColorUtils.transparent(); + return fromColor(color, colorHead); } public Rainbow withDefault(Rainbow defaultColor) { diff --git a/src/net/sourceforge/plantuml/style/FromSkinparamToStyle.java b/src/net/sourceforge/plantuml/style/FromSkinparamToStyle.java index fb956333f..fc1a28449 100644 --- a/src/net/sourceforge/plantuml/style/FromSkinparamToStyle.java +++ b/src/net/sourceforge/plantuml/style/FromSkinparamToStyle.java @@ -144,6 +144,7 @@ public class FromSkinparamToStyle { addConvert("arrowThickness", PName.LineThickness, SName.arrow); addConvert("arrowColor", PName.LineColor, SName.arrow); addConvert("arrowStyle", PName.LineStyle, SName.arrow); + addConvert("arrowHeadColor", PName.HeadColor, SName.arrow); addConvert("defaulttextalignment", PName.HorizontalAlignment, SName.root); addConvert("defaultFontName", PName.FontName, SName.root); @@ -220,14 +221,12 @@ public class FromSkinparamToStyle { addConvert("IconPublicColor", PName.LineColor, SName.visibilityIcon, SName.public_); addConvert("IconPublicBackgroundColor", PName.BackGroundColor, SName.visibilityIcon, SName.public_); - // 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); - } private static void addMagic(SName sname) { @@ -240,7 +239,7 @@ public class FromSkinparamToStyle { addConvert(cleanName + "BorderStyle", PName.LineStyle, 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); diff --git a/src/net/sourceforge/plantuml/style/PName.java b/src/net/sourceforge/plantuml/style/PName.java index 5f6fb524c..04b918e1f 100644 --- a/src/net/sourceforge/plantuml/style/PName.java +++ b/src/net/sourceforge/plantuml/style/PName.java @@ -46,6 +46,7 @@ public enum PName { LineThickness, // DiagonalCorner, // HyperLinkColor, // + HeadColor, // LineColor, // LineStyle, // Padding, // diff --git a/src/net/sourceforge/plantuml/version/Version.java b/src/net/sourceforge/plantuml/version/Version.java index 8adf14f32..729f441ea 100644 --- a/src/net/sourceforge/plantuml/version/Version.java +++ b/src/net/sourceforge/plantuml/version/Version.java @@ -44,7 +44,7 @@ public class Version { private static final int MAJOR_SEPARATOR = 1000000; public static int version() { - return 1202205; + return 1202206; } public static int versionPatched() { @@ -80,7 +80,7 @@ public class Version { } public static int beta() { - final int beta = 5; + final int beta = 0; return beta; } @@ -93,7 +93,7 @@ public class Version { } public static long compileTime() { - return 1651316152000L; + return 1655832889469L; } public static String compileTimeString() {