Skip to content

Commit 5bbb5a8

Browse files
committed
fix: EBNF more arrow head
1 parent 5d9a939 commit 5bbb5a8

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

src/net/sourceforge/plantuml/ebnf/ETile.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ protected final void drawHline(UGraphic ug, double y, double x1, double x2) {
7474
ug.apply(new UTranslate(x1, y)).draw(ULine.hline(x2 - x1));
7575
}
7676

77-
protected final void drawHlineDirected(UGraphic ug, double y, double x1, double x2, double coef) {
77+
protected final void drawHlineDirected(UGraphic ug, double y, double x1, double x2, double coef, double minimunSizeForArrow) {
7878
ug.apply(new UTranslate(x1, y)).draw(ULine.hline(x2 - x1));
79-
if (x2 > x1 + 25)
79+
if (x2 > x1 + minimunSizeForArrow)
8080
ug.apply(new CopyForegroundColorToBackgroundColor())
8181
.apply(new UTranslate(x1 * (1 - coef) + x2 * coef - 2, y)).draw(getArrowToRight());
8282

src/net/sourceforge/plantuml/ebnf/ETileAlternation.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public void drawU(UGraphic ug) {
109109
tile.drawU(ug.apply(new UTranslate(c, y)));
110110

111111
CornerCurved.createSW(marginx).drawU(ug.apply(new UTranslate(b, lastLinePos)));
112-
drawHlineDirected(ug, lastLinePos, c + dim.getWidth(), p, 0.3);
112+
drawHlineDirected(ug, lastLinePos, c + dim.getWidth(), p, 0.3, 25);
113113
CornerCurved.createSE(marginx).drawU(ug.apply(new UTranslate(q, lastLinePos)));
114114

115115
y += dim.getHeight() + 10;
@@ -130,10 +130,10 @@ public void drawU(UGraphic ug) {
130130
drawHline(ug, lastLinePos, c + dim.getWidth(), r);
131131
} else if (i > 0 && i < tiles.size() - 1) {
132132
CornerCurved.createSW(marginx).drawU(ug.apply(new UTranslate(b, lastLinePos)));
133-
drawHlineDirected(ug, lastLinePos, c + dim.getWidth(), p, 0.5);
133+
drawHlineDirected(ug, lastLinePos, c + dim.getWidth(), p, 0.5, 25);
134134
CornerCurved.createSE(marginx).drawU(ug.apply(new UTranslate(q, lastLinePos)));
135135
} else if (i == tiles.size() - 1) {
136-
drawHlineDirected(ug, lastLinePos, c + dim.getWidth(), p, 0.5);
136+
drawHlineDirected(ug, lastLinePos, c + dim.getWidth(), p, 0.5, 25);
137137

138138
}
139139
y += dim.getHeight() + 10;

src/net/sourceforge/plantuml/ebnf/ETileBox.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,8 @@ public void drawU(UGraphic ug) {
185185
}
186186

187187
if (posxBox > 0) {
188-
drawHlineDirected(ug, getH1(stringBounder), 0, posxBox, .5);
189-
drawHlineDirected(ug, getH1(stringBounder), posxBox + dimBox.getWidth(), dim.getWidth(), .5);
188+
drawHlineDirected(ug, getH1(stringBounder), 0, posxBox, .5, 25);
189+
drawHlineDirected(ug, getH1(stringBounder), posxBox + dimBox.getWidth(), dim.getWidth(), .5, 25);
190190
}
191191

192192
}

src/net/sourceforge/plantuml/ebnf/ETileConcatenation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public void drawU(UGraphic ug) {
7070
tile.drawU(ug.apply(new UTranslate(x, fullLinePos - linePos)));
7171
x += tile.calculateDimension(stringBounder).getWidth();
7272
if (i != tiles.size() - 1) {
73-
drawHlineDirected(ug, fullLinePos, x, x + marginx, 0.5);
73+
drawHlineDirected(ug, fullLinePos, x, x + marginx, 0.5, 25);
7474
x += marginx;
7575
}
7676
}

src/net/sourceforge/plantuml/ebnf/ETileOptional.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public void drawU(UGraphic ug) {
107107
drawVline(ug, posA, corner + posYoptionalLine, linePos - corner);
108108
CornerCurved.createNW(corner).drawU(ug.apply(new UTranslate(posA, posYoptionalLine)));
109109

110-
drawHlineDirected(ug, posYoptionalLine, posA + corner, posB - corner, 0.4);
110+
drawHlineDirected(ug, posYoptionalLine, posA + corner, posB - corner, 0.4, 0);
111111

112112
CornerCurved.createSW(corner).drawU(ug.apply(new UTranslate(posB, linePos)));
113113
drawVline(ug, posB, corner + posYoptionalLine, linePos - corner);

src/net/sourceforge/plantuml/ebnf/ETileWithCircles.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ public void drawU(UGraphic ug) {
8686
.apply(new UTranslate(fullDim.getWidth() - SIZE / 2, linePos - SIZE / 2)).draw(circle);
8787

8888
ug = ug.apply(UStroke.withThickness(1.5));
89-
drawHlineDirected(ug, linePos, SIZE, deltax, 0.5);
90-
drawHlineDirected(ug, linePos, fullDim.getWidth() - deltax, fullDim.getWidth() - SIZE / 2, 0.5);
89+
drawHlineDirected(ug, linePos, SIZE, deltax, 0.5, 25);
90+
drawHlineDirected(ug, linePos, fullDim.getWidth() - deltax, fullDim.getWidth() - SIZE / 2, 0.5, 25);
9191
}
9292

9393
@Override

0 commit comments

Comments
 (0)