1
0
mirror of https://github.com/octoleo/plantuml.git synced 2024-06-01 08:00:48 +00:00

Import version 1.2022.6

This commit is contained in:
Arnaud Roques 2022-06-22 09:30:15 +02:00
parent 6a51780588
commit 285c21492f
5 changed files with 21 additions and 12 deletions

View File

@ -321,9 +321,9 @@ public class Snake implements UShape {
if (same(this.getLast(), other.getFirst())) { if (same(this.getLast(), other.getFirst())) {
final UPolygon oneOf = other.endDecoration == null ? endDecoration : other.endDecoration; 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"); throw new UnsupportedOperationException("Not yet coded: to be done");
}
final ArrayList<Text> mergeTexts = new ArrayList<Text>(this.texts); final ArrayList<Text> mergeTexts = new ArrayList<Text>(this.texts);
mergeTexts.addAll(other.texts); mergeTexts.addAll(other.texts);
final Snake result = new Snake(skinParam, null, color, oneOf, this.worm.merge(other.worm, strategy), final Snake result = new Snake(skinParam, null, color, oneOf, this.worm.merge(other.worm, strategy),

View File

@ -42,17 +42,18 @@ import java.util.Objects;
import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.api.ThemeStyle; import net.sourceforge.plantuml.api.ThemeStyle;
import net.sourceforge.plantuml.skin.rose.Rose;
import net.sourceforge.plantuml.style.PName; import net.sourceforge.plantuml.style.PName;
import net.sourceforge.plantuml.style.Style; 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.HColor;
import net.sourceforge.plantuml.ugraphic.color.HColorSet; import net.sourceforge.plantuml.ugraphic.color.HColorSet;
import net.sourceforge.plantuml.ugraphic.color.HColorUtils;
import net.sourceforge.plantuml.ugraphic.color.NoSuchColorException; import net.sourceforge.plantuml.ugraphic.color.NoSuchColorException;
public class Rainbow { public class Rainbow {
private final static Rose rose = new Rose();
private final List<HtmlColorAndStyle> colors = new ArrayList<>(); private final List<HtmlColorAndStyle> colors = new ArrayList<>();
private final int colorArrowSeparationSpace; private final int colorArrowSeparationSpace;
@ -83,7 +84,15 @@ public class Rainbow {
public static Rainbow build(Style style, HColorSet set, ThemeStyle themeStyle) { public static Rainbow build(Style style, HColorSet set, ThemeStyle themeStyle) {
final HColor color = style.value(PName.LineColor).asColor(themeStyle, set); 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) { public Rainbow withDefault(Rainbow defaultColor) {

View File

@ -144,6 +144,7 @@ public class FromSkinparamToStyle {
addConvert("arrowThickness", PName.LineThickness, SName.arrow); addConvert("arrowThickness", PName.LineThickness, SName.arrow);
addConvert("arrowColor", PName.LineColor, SName.arrow); addConvert("arrowColor", PName.LineColor, SName.arrow);
addConvert("arrowStyle", PName.LineStyle, SName.arrow); addConvert("arrowStyle", PName.LineStyle, SName.arrow);
addConvert("arrowHeadColor", PName.HeadColor, SName.arrow);
addConvert("defaulttextalignment", PName.HorizontalAlignment, SName.root); addConvert("defaulttextalignment", PName.HorizontalAlignment, SName.root);
addConvert("defaultFontName", PName.FontName, SName.root); addConvert("defaultFontName", PName.FontName, SName.root);
@ -220,14 +221,12 @@ public class FromSkinparamToStyle {
addConvert("IconPublicColor", PName.LineColor, SName.visibilityIcon, SName.public_); addConvert("IconPublicColor", PName.LineColor, SName.visibilityIcon, SName.public_);
addConvert("IconPublicBackgroundColor", PName.BackGroundColor, SName.visibilityIcon, SName.public_); addConvert("IconPublicBackgroundColor", PName.BackGroundColor, SName.visibilityIcon, SName.public_);
// addConvert("nodeStereotypeFontSize", PName.FontSize, SName.node, SName.stereotype); // addConvert("nodeStereotypeFontSize", PName.FontSize, SName.node, SName.stereotype);
// addConvert("sequenceStereotypeFontSize", PName.FontSize, SName.stereotype); // addConvert("sequenceStereotypeFontSize", PName.FontSize, SName.stereotype);
// addConvert("sequenceStereotypeFontStyle", PName.FontStyle, SName.stereotype); // addConvert("sequenceStereotypeFontStyle", PName.FontStyle, SName.stereotype);
// addConvert("sequenceStereotypeFontColor", PName.FontColor, SName.stereotype); // addConvert("sequenceStereotypeFontColor", PName.FontColor, SName.stereotype);
// addConvert("sequenceStereotypeFontName", PName.FontName, SName.stereotype); // addConvert("sequenceStereotypeFontName", PName.FontName, SName.stereotype);
} }
private static void addMagic(SName sname) { private static void addMagic(SName sname) {
@ -240,7 +239,7 @@ public class FromSkinparamToStyle {
addConvert(cleanName + "BorderStyle", PName.LineStyle, sname); addConvert(cleanName + "BorderStyle", PName.LineStyle, sname);
addConFont(cleanName, sname); addConFont(cleanName, sname);
addConvert(cleanName + "Shadowing", PName.Shadowing, sname); addConvert(cleanName + "Shadowing", PName.Shadowing, sname);
addConvert(cleanName + "StereotypeFontSize", PName.FontSize, SName.stereotype, sname); addConvert(cleanName + "StereotypeFontSize", PName.FontSize, SName.stereotype, sname);
addConvert(cleanName + "StereotypeFontStyle", PName.FontStyle, SName.stereotype, sname); addConvert(cleanName + "StereotypeFontStyle", PName.FontStyle, SName.stereotype, sname);
addConvert(cleanName + "StereotypeFontColor", PName.FontColor, SName.stereotype, sname); addConvert(cleanName + "StereotypeFontColor", PName.FontColor, SName.stereotype, sname);

View File

@ -46,6 +46,7 @@ public enum PName {
LineThickness, // LineThickness, //
DiagonalCorner, // DiagonalCorner, //
HyperLinkColor, // HyperLinkColor, //
HeadColor, //
LineColor, // LineColor, //
LineStyle, // LineStyle, //
Padding, // Padding, //

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 1202205; return 1202206;
} }
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 = 5; final int beta = 0;
return beta; return beta;
} }
@ -93,7 +93,7 @@ public class Version {
} }
public static long compileTime() { public static long compileTime() {
return 1651316152000L; return 1655832889469L;
} }
public static String compileTimeString() { public static String compileTimeString() {