1
0
mirror of https://github.com/octoleo/plantuml.git synced 2024-06-07 10:50:53 +00:00
This commit is contained in:
Arnaud Roques 2022-04-07 18:53:33 +02:00
parent 29cd7dce0c
commit d8c80f4110
3 changed files with 23 additions and 19 deletions

View File

@ -70,14 +70,15 @@ public class FontConfiguration {
return getFont().toStringDebug() + " " + styles.toString();
}
public static FontConfiguration create(UFont font, HColor color, HColor hyperlinkColor, boolean useUnderlineForHyperlink) {
public static FontConfiguration create(UFont font, HColor color, HColor hyperlinkColor,
boolean useUnderlineForHyperlink) {
return create(font, color, hyperlinkColor, useUnderlineForHyperlink, 8);
}
public static FontConfiguration create(UFont font, HColor color, HColor hyperlinkColor, boolean useUnderlineForHyperlink,
int tabSize) {
return new FontConfiguration(getStyles(font), font, color, font, color, null, FontPosition.NORMAL, new SvgAttributes(), false,
hyperlinkColor, useUnderlineForHyperlink, tabSize);
public static FontConfiguration create(UFont font, HColor color, HColor hyperlinkColor,
boolean useUnderlineForHyperlink, int tabSize) {
return new FontConfiguration(getStyles(font), font, color, font, color, null, FontPosition.NORMAL,
new SvgAttributes(), false, hyperlinkColor, useUnderlineForHyperlink, tabSize);
}
public static FontConfiguration blackBlueTrue(UFont font) {
@ -91,10 +92,12 @@ public class FontConfiguration {
}
public static FontConfiguration create(ISkinParam skinParam, Style style) {
// User getStyle().getFontConfiguration(skinParam.getIHtmlColorSet()) instead ?
final HColor hyperlinkColor = style.value(PName.HyperLinkColor).asColor(skinParam.getThemeStyle(),
skinParam.getIHtmlColorSet());
final boolean useUnderlineForHyperlink = skinParam.useUnderlineForHyperlink();
return create(style.getUFont(),
style.value(PName.FontColor).asColor(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet()),
skinParam.getHyperlinkColor(), skinParam.useUnderlineForHyperlink(), skinParam.getTabSize());
hyperlinkColor, useUnderlineForHyperlink, skinParam.getTabSize());
}
// ---

View File

@ -625,6 +625,14 @@ public class SvekLine implements Moveable, Hideable, GuideLine {
if (opale)
return;
if (link.isInvis())
return;
if (dotPath == null) {
Log.info("DotPath is null for " + this);
return;
}
ug.draw(link.commentForSvg());
final Map<UGroupType, String> typeIDent = new EnumMap<>(UGroupType.class);
typeIDent.put(UGroupType.CLASS,
@ -648,9 +656,6 @@ public class SvekLine implements Moveable, Hideable, GuideLine {
x += dx;
y += dy;
if (link.isInvis())
return;
if (this.link.getColors() != null) {
final HColor newColor = this.link.getColors().getColor(ColorType.ARROW, ColorType.LINE);
if (newColor != null)
@ -669,10 +674,6 @@ public class SvekLine implements Moveable, Hideable, GuideLine {
ug = ug.apply(stroke);
// double moveEndY = 0;
if (dotPath == null) {
Log.info("DotPath is null for " + this);
return;
}
DotPath todraw = dotPath;
if (link.getEntity2().isGroup() && link.getEntity2().getUSymbol() instanceof USymbolFolder) {
final Cluster endCluster = bibliotekon.getCluster((IGroup) link.getEntity2());
@ -738,7 +739,7 @@ public class SvekLine implements Moveable, Hideable, GuideLine {
final Set<Point2D> bez = dotPath.sample();
Point2D minPt = null;
double minDist = Double.MAX_VALUE;
for (Point2D pt : square) {
for (Point2D pt : square)
for (Point2D pt2 : bez) {
final double distance = pt2.distance(pt);
if (minPt == null || distance < minDist) {
@ -746,7 +747,7 @@ public class SvekLine implements Moveable, Hideable, GuideLine {
minDist = distance;
}
}
}
link.getLinkConstraint().setPosition(link, minPt);
link.getLinkConstraint().drawMe(ug, skinParam);
}
@ -769,9 +770,9 @@ public class SvekLine implements Moveable, Hideable, GuideLine {
private String uniq(final Set<String> ids, final String comment) {
boolean changed = ids.add(comment);
if (changed) {
if (changed)
return comment;
}
int i = 1;
while (true) {
final String candidate = comment + "-" + i;

View File

@ -80,7 +80,7 @@ public class Version {
}
public static int beta() {
final int beta = 1;
final int beta = 2;
return beta;
}