1
0
mirror of https://github.com/octoleo/plantuml.git synced 2024-06-06 10:20:54 +00:00
This commit is contained in:
Arnaud Roques 2023-01-17 19:19:39 +01:00
parent c2bb4f8a37
commit c1bbdd6ade
2 changed files with 26 additions and 9 deletions

View File

@ -546,15 +546,32 @@ public class TikzGraphics {
final double newx = coord[5] + x;
final double newy = coord[6] + y;
final boolean easyCase = coord[2] == 0 && coord[3] == 0 && coord[4] == 1;
// if (newx > lastx && newy < lasty) {
// final int start = 180;
// final int end = 270;
// final String radius = format(coord[0]);
// sb.append(" arc(" + start + ":" + end + ":" + radius + "pt) ");
// }
sb.append(" -- ");
sb.append(couple(coord[5] + x, coord[6] + y));
if (easyCase && newx > lastx && newy < lasty) {
final int start = 180;
final int end = 270;
final String radius = format(coord[0]);
sb.append(" arc(" + start + ":" + end + ":" + radius + "pt) ");
} else if (easyCase && newx > lastx && newy > lasty) {
final int start = 270;
final int end = 360;
final String radius = format(coord[0]);
sb.append(" arc(" + start + ":" + end + ":" + radius + "pt) ");
} else if (easyCase && newx < lastx && newy > lasty) {
final int start = 0;
final int end = 90;
final String radius = format(coord[0]);
sb.append(" arc(" + start + ":" + end + ":" + radius + "pt) ");
} else if (easyCase && newx < lastx && newy < lasty) {
final int start = 90;
final int end = 180;
final String radius = format(coord[0]);
sb.append(" arc(" + start + ":" + end + ":" + radius + "pt) ");
} else {
sb.append(" -- ");
sb.append(couple(coord[5] + x, coord[6] + y));
}
lastx = newx;
lasty = newy;

View File

@ -81,7 +81,7 @@ public class Version {
}
public static int beta() {
final int beta = 4;
final int beta = 5;
return beta;
}