1
0
mirror of https://github.com/octoleo/plantuml.git synced 2024-12-22 19:09:03 +00:00
This commit is contained in:
Arnaud Roques 2022-05-22 12:22:28 +02:00
parent 7ac50bf403
commit 2621139b20
2 changed files with 13 additions and 7 deletions

View File

@ -172,21 +172,27 @@ public class PlayerBinary extends Player {
List<String> lastValues = initialState == null ? Collections.singletonList(LOW_STRING) List<String> lastValues = initialState == null ? Collections.singletonList(LOW_STRING)
: initialState.getStates(); : initialState.getStates();
final StringBounder stringBounder = ug.getStringBounder(); final StringBounder stringBounder = ug.getStringBounder();
final ULine vline = ULine.vline(getYlow(stringBounder) - getYhigh(stringBounder)); final double yhigh = getYhigh(stringBounder);
final double ylow = getYlow(stringBounder);
final ULine vline = ULine.vline(ylow - yhigh);
for (Map.Entry<TimeTick, ChangeState> ent : values.entrySet()) { for (Map.Entry<TimeTick, ChangeState> ent : values.entrySet()) {
final ChangeState value = ent.getValue(); final ChangeState value = ent.getValue();
final double x = ruler.getPosInPixel(ent.getKey()); final double x = ruler.getPosInPixel(ent.getKey());
if (lastValues.size() == 1)
ug.apply(new UTranslate(lastx, getYpos(stringBounder, lastValues.get(0)))) ug.apply(new UTranslate(lastx, getYpos(stringBounder, lastValues.get(0))))
.draw(ULine.hline(x - lastx)); .draw(ULine.hline(x - lastx));
else
for (double tmpx = lastx; tmpx < x; tmpx += 5)
ug.apply(new UTranslate(tmpx, yhigh)).draw(vline);
if (lastValues.equals(value.getStates()) == false) if (lastValues.equals(value.getStates()) == false)
ug.apply(new UTranslate(x, getYhigh(stringBounder))).draw(vline); ug.apply(new UTranslate(x, yhigh)).draw(vline);
if (value.getComment() != null) { if (value.getComment() != null) {
final TextBlock label = getTextBlock(value.getComment()); final TextBlock label = getTextBlock(value.getComment());
// final Dimension2D dim = label.calculateDimension(ug.getStringBounder()); label.drawU(ug.apply(new UTranslate(x + 2, yhigh)));
label.drawU(ug.apply(new UTranslate(x + 2, getYhigh(stringBounder))));
} }
lastx = x; lastx = x;

View File

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