From efab37d3ce56842465a41a8ee4e6277f912f840f Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Mon, 22 Mar 2021 19:00:32 +0100 Subject: [PATCH] Import version 1.2021.3 --- src/net/sourceforge/plantuml/OptionFlags.java | 2 +- .../sourceforge/plantuml/UmlDiagramType.java | 6 + .../ftile/vcompact/FloatingNote.java | 16 +- .../ftile/vcompact/FtileGroup.java | 6 +- .../ftile/vcompact/FtileNoteAlone.java | 5 +- .../ftile/vcompact/FtileWithNotes.java | 5 +- .../plantuml/cute/ApolloniusSolver.java | 97 --------- .../plantuml/cute/ApolloniusSolver2.java | 76 ------- src/net/sourceforge/plantuml/cute/Arc.java | 113 ---------- .../sourceforge/plantuml/cute/Balloon.java | 125 ----------- .../plantuml/cute/BetweenCorners.java | 195 ------------------ src/net/sourceforge/plantuml/cute/Cheese.java | 124 ----------- src/net/sourceforge/plantuml/cute/Circle.java | 66 ------ src/net/sourceforge/plantuml/cute/Corner.java | 46 ----- .../sourceforge/plantuml/cute/Crossing.java | 68 ------ .../plantuml/cute/CrossingSegment.java | 73 ------- .../plantuml/cute/CrossingSimple.java | 91 -------- .../sourceforge/plantuml/cute/CutePath.java | 179 ---------------- .../sourceforge/plantuml/cute/CuteShape.java | 44 ---- .../plantuml/cute/CuteShapeFactory.java | 84 -------- src/net/sourceforge/plantuml/cute/Group.java | 126 ----------- .../plantuml/cute/InfiniteLine.java | 82 -------- .../sourceforge/plantuml/cute/MyDouble.java | 91 -------- .../sourceforge/plantuml/cute/MyPoint2D.java | 121 ----------- .../plantuml/cute/PSystemCute.java | 109 ---------- .../plantuml/cute/PSystemCuteFactory.java | 61 ------ .../plantuml/cute/Positionned.java | 46 ----- .../plantuml/cute/PositionnedImpl.java | 105 ---------- .../sourceforge/plantuml/cute/Rectangle.java | 106 ---------- .../plantuml/cute/RotationZoom.java | 129 ------------ .../sourceforge/plantuml/cute/Segment.java | 110 ---------- src/net/sourceforge/plantuml/cute/Stick.java | 100 --------- .../sourceforge/plantuml/cute/Tension.java | 62 ------ .../sourceforge/plantuml/cute/Triangle.java | 62 ------ .../plantuml/cute/TriangleCorner.java | 143 ------------- .../plantuml/cute/TriangleCornerSimple.java | 117 ----------- .../sourceforge/plantuml/cute/VarArgs.java | 132 ------------ .../plantuml/jungle/CommandAddLevel.java | 66 ------ .../plantuml/jungle/CommandEmpty.java | 62 ------ .../sourceforge/plantuml/jungle/GNode.java | 67 ------ .../plantuml/jungle/GNodeUtils.java | 56 ----- .../sourceforge/plantuml/jungle/GTile.java | 44 ---- .../plantuml/jungle/GTileGeometry.java | 76 ------- .../plantuml/jungle/GTileLeftRight.java | 103 --------- .../plantuml/jungle/GTileNode.java | 99 --------- .../plantuml/jungle/GTileOneLevelFactory.java | 57 ----- .../plantuml/jungle/GTileStack.java | 84 -------- .../sourceforge/plantuml/jungle/Needle.java | 114 ---------- .../plantuml/jungle/PSystemTree.java | 127 ------------ .../plantuml/jungle/PSystemTreeFactory.java | 63 ------ .../plantuml/jungle/Rendering.java | 42 ---- .../svek/image/EntityImageEmptyPackage.java | 57 +++-- .../timingdiagram/TimeConstraint.java | 3 + .../command/CommandConstraint.java | 6 + .../plantuml/ugraphic/ImageBuilder.java | 12 +- .../ugraphic/crossing/UGraphicCrossing.java | 163 --------------- .../sourceforge/plantuml/version/Version.java | 6 +- stdlib/archimate-abx.repx | Bin 2406 -> 2528 bytes stdlib/c4-abx.repx | Bin 3189 -> 5844 bytes stdlib/c4-dex.repx | Bin 201 -> 301 bytes 60 files changed, 93 insertions(+), 4337 deletions(-) delete mode 100644 src/net/sourceforge/plantuml/cute/ApolloniusSolver.java delete mode 100644 src/net/sourceforge/plantuml/cute/ApolloniusSolver2.java delete mode 100644 src/net/sourceforge/plantuml/cute/Arc.java delete mode 100644 src/net/sourceforge/plantuml/cute/Balloon.java delete mode 100644 src/net/sourceforge/plantuml/cute/BetweenCorners.java delete mode 100644 src/net/sourceforge/plantuml/cute/Cheese.java delete mode 100644 src/net/sourceforge/plantuml/cute/Circle.java delete mode 100644 src/net/sourceforge/plantuml/cute/Corner.java delete mode 100644 src/net/sourceforge/plantuml/cute/Crossing.java delete mode 100644 src/net/sourceforge/plantuml/cute/CrossingSegment.java delete mode 100644 src/net/sourceforge/plantuml/cute/CrossingSimple.java delete mode 100644 src/net/sourceforge/plantuml/cute/CutePath.java delete mode 100644 src/net/sourceforge/plantuml/cute/CuteShape.java delete mode 100644 src/net/sourceforge/plantuml/cute/CuteShapeFactory.java delete mode 100644 src/net/sourceforge/plantuml/cute/Group.java delete mode 100644 src/net/sourceforge/plantuml/cute/InfiniteLine.java delete mode 100644 src/net/sourceforge/plantuml/cute/MyDouble.java delete mode 100644 src/net/sourceforge/plantuml/cute/MyPoint2D.java delete mode 100644 src/net/sourceforge/plantuml/cute/PSystemCute.java delete mode 100644 src/net/sourceforge/plantuml/cute/PSystemCuteFactory.java delete mode 100644 src/net/sourceforge/plantuml/cute/Positionned.java delete mode 100644 src/net/sourceforge/plantuml/cute/PositionnedImpl.java delete mode 100644 src/net/sourceforge/plantuml/cute/Rectangle.java delete mode 100644 src/net/sourceforge/plantuml/cute/RotationZoom.java delete mode 100644 src/net/sourceforge/plantuml/cute/Segment.java delete mode 100644 src/net/sourceforge/plantuml/cute/Stick.java delete mode 100644 src/net/sourceforge/plantuml/cute/Tension.java delete mode 100644 src/net/sourceforge/plantuml/cute/Triangle.java delete mode 100644 src/net/sourceforge/plantuml/cute/TriangleCorner.java delete mode 100644 src/net/sourceforge/plantuml/cute/TriangleCornerSimple.java delete mode 100644 src/net/sourceforge/plantuml/cute/VarArgs.java delete mode 100644 src/net/sourceforge/plantuml/jungle/CommandAddLevel.java delete mode 100644 src/net/sourceforge/plantuml/jungle/CommandEmpty.java delete mode 100644 src/net/sourceforge/plantuml/jungle/GNode.java delete mode 100644 src/net/sourceforge/plantuml/jungle/GNodeUtils.java delete mode 100644 src/net/sourceforge/plantuml/jungle/GTile.java delete mode 100644 src/net/sourceforge/plantuml/jungle/GTileGeometry.java delete mode 100644 src/net/sourceforge/plantuml/jungle/GTileLeftRight.java delete mode 100644 src/net/sourceforge/plantuml/jungle/GTileNode.java delete mode 100644 src/net/sourceforge/plantuml/jungle/GTileOneLevelFactory.java delete mode 100644 src/net/sourceforge/plantuml/jungle/GTileStack.java delete mode 100644 src/net/sourceforge/plantuml/jungle/Needle.java delete mode 100644 src/net/sourceforge/plantuml/jungle/PSystemTree.java delete mode 100644 src/net/sourceforge/plantuml/jungle/PSystemTreeFactory.java delete mode 100644 src/net/sourceforge/plantuml/jungle/Rendering.java delete mode 100644 src/net/sourceforge/plantuml/ugraphic/crossing/UGraphicCrossing.java diff --git a/src/net/sourceforge/plantuml/OptionFlags.java b/src/net/sourceforge/plantuml/OptionFlags.java index 6a8c1ee76..c8b362f00 100644 --- a/src/net/sourceforge/plantuml/OptionFlags.java +++ b/src/net/sourceforge/plantuml/OptionFlags.java @@ -71,7 +71,7 @@ public class OptionFlags { static public final boolean USE_INTERFACE_EYE2 = false; // static public final boolean SWI2 = false; // static public final boolean USE_COMPOUND = false; - static public final boolean OMEGA_CROSSING = false; + // static public final boolean OMEGA_CROSSING = false; // static public final boolean LINK_BETWEEN_FIELDS = true; diff --git a/src/net/sourceforge/plantuml/UmlDiagramType.java b/src/net/sourceforge/plantuml/UmlDiagramType.java index 3311a9d73..231b8fdc4 100644 --- a/src/net/sourceforge/plantuml/UmlDiagramType.java +++ b/src/net/sourceforge/plantuml/UmlDiagramType.java @@ -75,6 +75,12 @@ public enum UmlDiagramType { if (this == SALT) { return SName.saltDiagram; } + if (this == YAML) { + return SName.yamlDiagram; + } + if (this == JSON) { + return SName.jsonDiagram; + } return SName.activityDiagram; } } diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FloatingNote.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FloatingNote.java index 33c7962e9..eebac6f2c 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FloatingNote.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FloatingNote.java @@ -41,6 +41,7 @@ import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.LineBreakStrategy; +import net.sourceforge.plantuml.UseStyle; import net.sourceforge.plantuml.creole.CreoleMode; import net.sourceforge.plantuml.creole.Parser; import net.sourceforge.plantuml.creole.Sheet; @@ -54,6 +55,7 @@ import net.sourceforge.plantuml.graphic.HorizontalAlignment; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.skin.rose.Rose; +import net.sourceforge.plantuml.style.Style; import net.sourceforge.plantuml.svek.image.Opale; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UStroke; @@ -63,7 +65,7 @@ public class FloatingNote extends AbstractTextBlock implements Stencil, TextBloc private final Opale opale; - public FloatingNote(Display note, ISkinParam skinParam) { + public FloatingNote(Display note, ISkinParam skinParam, Style style) { final Rose rose = new Rose(); @@ -72,11 +74,19 @@ public class FloatingNote extends AbstractTextBlock implements Stencil, TextBloc final FontConfiguration fc = new FontConfiguration(skinParam, FontParam.NOTE, null); + final LineBreakStrategy wrapWidth; + + if (UseStyle.useBetaStyle()) { + wrapWidth = style.wrapWidth(); + } else { + wrapWidth = skinParam.wrapWidth(); + + } final Sheet sheet = Parser .build(fc, skinParam.getDefaultTextAlignment(HorizontalAlignment.LEFT), skinParam, CreoleMode.FULL) .createSheet(note); - final SheetBlock2 sheetBlock2 = new SheetBlock2( - new SheetBlock1(sheet, LineBreakStrategy.NONE, skinParam.getPadding()), this, new UStroke(1)); + final SheetBlock2 sheetBlock2 = new SheetBlock2(new SheetBlock1(sheet, wrapWidth, skinParam.getPadding()), this, + new UStroke(1)); final double shadowing; shadowing = skinParam.shadowing(null) ? 4 : 0; this.opale = new Opale(shadowing, borderColor, noteBackgroundColor, sheetBlock2, false); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileGroup.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileGroup.java index 46f5923f1..ddff9e6ff 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileGroup.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileGroup.java @@ -101,11 +101,13 @@ public class FtileGroup extends AbstractFtile { this.borderColor = borderColor == null ? HColorUtils.BLACK : borderColor; final FontConfiguration fc; + final Style style; if (UseStyle.useBetaStyle()) { - final Style style = getDefaultStyleDefinitionPartition().getMergedStyle(skinParam.getCurrentStyleBuilder()); + style = getDefaultStyleDefinitionPartition().getMergedStyle(skinParam.getCurrentStyleBuilder()); fc = style.getFontConfiguration(getIHtmlColorSet()); this.shadowing = style.value(PName.Shadowing).asDouble(); } else { + style = null; final UFont font = skinParam.getFont(null, false, FontParam.PARTITION); final HColor fontColor = skinParam.getFontHtmlColor(null, FontParam.PARTITION); fc = new FontConfiguration(font, fontColor, skinParam.getHyperlinkColor(), @@ -120,7 +122,7 @@ public class FtileGroup extends AbstractFtile { if (Display.isNull(displayNote)) { this.headerNote = TextBlockUtils.empty(0, 0); } else { - this.headerNote = new FloatingNote(displayNote, skinParam); + this.headerNote = new FloatingNote(displayNote, skinParam, style); } final UStroke thickness = skinParam.getThickness(LineParam.partitionBorder, null); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileNoteAlone.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileNoteAlone.java index 83ed6a488..f83e567e4 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileNoteAlone.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileNoteAlone.java @@ -110,15 +110,18 @@ public class FtileNoteAlone extends AbstractFtile implements Stencil, Styleable final HColor noteBackgroundColor; final HColor borderColor; final double shadowing; + final LineBreakStrategy wrapWidth; if (UseStyle.useBetaStyle()) { final Style style = getDefaultStyleDefinition().getMergedStyle(skinParam.getCurrentStyleBuilder()); noteBackgroundColor = style.value(PName.BackGroundColor).asColor(getIHtmlColorSet()); borderColor = style.value(PName.LineColor).asColor(getIHtmlColorSet()); shadowing = style.value(PName.Shadowing).asDouble(); + wrapWidth = style.wrapWidth(); } else { noteBackgroundColor = rose.getHtmlColor(skinParam, ColorParam.noteBackground); borderColor = rose.getHtmlColor(skinParam, ColorParam.noteBorder); shadowing = skinParam.shadowing(null) ? 4 : 0; + wrapWidth = skinParam.wrapWidth(); } final FontConfiguration fc = new FontConfiguration(skinParam, FontParam.NOTE, null); @@ -126,7 +129,7 @@ public class FtileNoteAlone extends AbstractFtile implements Stencil, Styleable final Sheet sheet = Parser .build(fc, skinParam.getDefaultTextAlignment(HorizontalAlignment.LEFT), skinParam, CreoleMode.FULL) .createSheet(note); - final TextBlock text = new SheetBlock2(new SheetBlock1(sheet, LineBreakStrategy.NONE, skinParam.getPadding()), + final TextBlock text = new SheetBlock2(new SheetBlock1(sheet, wrapWidth, skinParam.getPadding()), this, new UStroke(1)); opale = new Opale(shadowing, borderColor, noteBackgroundColor, text, false); diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileWithNotes.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileWithNotes.java index 322012560..5d5faec10 100644 --- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileWithNotes.java +++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileWithNotes.java @@ -115,6 +115,7 @@ public class FtileWithNotes extends AbstractFtile { final FontConfiguration fc; final double shadowing; + final LineBreakStrategy wrapWidth; if (UseStyle.useBetaStyle()) { final Style style = getDefaultStyleDefinition().getMergedStyle(skinParam.getCurrentStyleBuilder()) .eventuallyOverride(note.getColors()); @@ -122,17 +123,19 @@ public class FtileWithNotes extends AbstractFtile { borderColor = style.value(PName.LineColor).asColor(getIHtmlColorSet()); fc = style.getFontConfiguration(getIHtmlColorSet()); shadowing = style.value(PName.Shadowing).asDouble(); + wrapWidth = style.wrapWidth(); } else { noteBackgroundColor = rose.getHtmlColor(skinParam2, ColorParam.noteBackground); borderColor = rose.getHtmlColor(skinParam2, ColorParam.noteBorder); fc = new FontConfiguration(skinParam, FontParam.NOTE, null); shadowing = skinParam.shadowing(null) ? 4 : 0; + wrapWidth = skinParam.wrapWidth(); } final Sheet sheet = Parser .build(fc, skinParam.getDefaultTextAlignment(HorizontalAlignment.LEFT), skinParam, CreoleMode.FULL) .createSheet(note.getDisplay()); - final SheetBlock1 sheet1 = new SheetBlock1(sheet, LineBreakStrategy.NONE, skinParam.getPadding()); + final SheetBlock1 sheet1 = new SheetBlock1(sheet, wrapWidth, skinParam.getPadding()); final SheetBlock2 sheet2 = new SheetBlock2(sheet1, new Stencil() { // -6 and 15 value comes from Opale: this is very ugly! public double getStartingX(StringBounder stringBounder, double y) { diff --git a/src/net/sourceforge/plantuml/cute/ApolloniusSolver.java b/src/net/sourceforge/plantuml/cute/ApolloniusSolver.java deleted file mode 100644 index dd30517f4..000000000 --- a/src/net/sourceforge/plantuml/cute/ApolloniusSolver.java +++ /dev/null @@ -1,97 +0,0 @@ -package net.sourceforge.plantuml.cute; - -// http://rosettacode.org/wiki/Problem_of_Apollonius#Java -public class ApolloniusSolver { - - static class Circle { - public double[] center; - public double radius; - - public Circle(double[] center, double radius) { - this.center = center; - this.radius = radius; - } - - public String toString() { - return String.format("Circle[x=%.2f,y=%.2f,r=%.2f]", center[0], center[1], radius); - } - } - - /** - * Solves the Problem of Apollonius (finding a circle tangent to three other circles in the plane). The method uses - * approximately 68 heavy operations (multiplication, division, square-roots). - * - * @param c1 - * One of the circles in the problem - * @param c2 - * One of the circles in the problem - * @param c3 - * One of the circles in the problem - * @param s1 - * An indication if the solution should be externally or internally tangent (+1/-1) to c1 - * @param s2 - * An indication if the solution should be externally or internally tangent (+1/-1) to c2 - * @param s3 - * An indication if the solution should be externally or internally tangent (+1/-1) to c3 - * @return The circle that is tangent to c1, c2 and c3. - */ - public static Circle solveApollonius(Circle c1, Circle c2, Circle c3, int s1, int s2, int s3) { - double x1 = c1.center[0]; - double y1 = c1.center[1]; - double r1 = c1.radius; - double x2 = c2.center[0]; - double y2 = c2.center[1]; - double r2 = c2.radius; - double x3 = c3.center[0]; - double y3 = c3.center[1]; - double r3 = c3.radius; - - // Currently optimized for fewest multiplications. Should be optimized for - // readability - double v11 = 2 * x2 - 2 * x1; - double v12 = 2 * y2 - 2 * y1; - double v13 = x1 * x1 - x2 * x2 + y1 * y1 - y2 * y2 - r1 * r1 + r2 * r2; - double v14 = 2 * s2 * r2 - 2 * s1 * r1; - - double v21 = 2 * x3 - 2 * x2; - double v22 = 2 * y3 - 2 * y2; - double v23 = x2 * x2 - x3 * x3 + y2 * y2 - y3 * y3 - r2 * r2 + r3 * r3; - double v24 = 2 * s3 * r3 - 2 * s2 * r2; - - double w12 = v12 / v11; - double w13 = v13 / v11; - double w14 = v14 / v11; - - double w22 = v22 / v21 - w12; - double w23 = v23 / v21 - w13; - double w24 = v24 / v21 - w14; - - double P = -w23 / w22; - double Q = w24 / w22; - double M = -w12 * P - w13; - double N = w14 - w12 * Q; - - double a = N * N + Q * Q - 1; - double b = 2 * M * N - 2 * N * x1 + 2 * P * Q - 2 * Q * y1 + 2 * s1 * r1; - double c = x1 * x1 + M * M - 2 * M * x1 + P * P + y1 * y1 - 2 * P * y1 - r1 * r1; - - // Find a root of a quadratic equation. This requires the circle centers not - // to be e.g. colinear - double D = b * b - 4 * a * c; - double rs = (-b - Math.sqrt(D)) / (2 * a); - double xs = M + N * rs; - double ys = P + Q * rs; - return new Circle(new double[] { xs, ys }, rs); - } - - public static void main(final String[] args) { - Circle c1 = new Circle(new double[] { 0, 0 }, 1); - Circle c2 = new Circle(new double[] { 4, 0 }, 1); - Circle c3 = new Circle(new double[] { 2, 4 }, 2); - // Expects "Circle[x=2.00,y=2.10,r=3.90]" (green circle in image) - System.out.println(solveApollonius(c1, c2, c3, 1, 1, 1)); - // Expects "Circle[x=2.00,y=0.83,r=1.17]" (red circle in image) - System.out.println(solveApollonius(c1, c2, c3, -1, -1, -1)); - } - -} diff --git a/src/net/sourceforge/plantuml/cute/ApolloniusSolver2.java b/src/net/sourceforge/plantuml/cute/ApolloniusSolver2.java deleted file mode 100644 index 2eca4cf14..000000000 --- a/src/net/sourceforge/plantuml/cute/ApolloniusSolver2.java +++ /dev/null @@ -1,76 +0,0 @@ -package net.sourceforge.plantuml.cute; - -import java.awt.geom.Point2D; - -// http://rosettacode.org/wiki/Problem_of_Apollonius#Java -public class ApolloniusSolver2 { - - /** - * Solves the Problem of Apollonius (finding a circle tangent to three other circles in the plane). The method uses - * approximately 68 heavy operations (multiplication, division, square-roots). - * - * @param c1 - * One of the circles in the problem - * @param c2 - * One of the circles in the problem - * @param c3 - * One of the circles in the problem - * @param s1 - * An indication if the solution should be externally or internally tangent (+1/-1) to c1 - * @param s2 - * An indication if the solution should be externally or internally tangent (+1/-1) to c2 - * @param s3 - * An indication if the solution should be externally or internally tangent (+1/-1) to c3 - * @return The circle that is tangent to c1, c2 and c3. - */ - public static Balloon solveApollonius(Balloon c1, Balloon c2, Balloon c3, int s1, int s2, int s3) { - double x1 = c1.getCenter().getX(); - double y1 = c1.getCenter().getY(); - double r1 = c1.getRadius(); - double x2 = c2.getCenter().getX(); - double y2 = c2.getCenter().getY(); - double r2 = c2.getRadius(); - double x3 = c3.getCenter().getX(); - double y3 = c3.getCenter().getY(); - double r3 = c3.getRadius(); - - // Currently optimized for fewest multiplications. Should be optimized for - // readability - double v11 = 2 * x2 - 2 * x1; - double v12 = 2 * y2 - 2 * y1; - double v13 = x1 * x1 - x2 * x2 + y1 * y1 - y2 * y2 - r1 * r1 + r2 * r2; - double v14 = 2 * s2 * r2 - 2 * s1 * r1; - - double v21 = 2 * x3 - 2 * x2; - double v22 = 2 * y3 - 2 * y2; - double v23 = x2 * x2 - x3 * x3 + y2 * y2 - y3 * y3 - r2 * r2 + r3 * r3; - double v24 = 2 * s3 * r3 - 2 * s2 * r2; - - double w12 = v12 / v11; - double w13 = v13 / v11; - double w14 = v14 / v11; - - double w22 = v22 / v21 - w12; - double w23 = v23 / v21 - w13; - double w24 = v24 / v21 - w14; - - double P = -w23 / w22; - double Q = w24 / w22; - double M = -w12 * P - w13; - double N = w14 - w12 * Q; - - double a = N * N + Q * Q - 1; - double b = 2 * M * N - 2 * N * x1 + 2 * P * Q - 2 * Q * y1 + 2 * s1 * r1; - double c = x1 * x1 + M * M - 2 * M * x1 + P * P + y1 * y1 - 2 * P * y1 - r1 * r1; - - // Find a root of a quadratic equation. This requires the circle centers not - // to be e.g. colinear - double D = b * b - 4 * a * c; - double rs = (-b - Math.sqrt(D)) / (2 * a); - double xs = M + N * rs; - double ys = P + Q * rs; - return new Balloon(new Point2D.Double(xs, ys), rs); - } - - -} diff --git a/src/net/sourceforge/plantuml/cute/Arc.java b/src/net/sourceforge/plantuml/cute/Arc.java deleted file mode 100644 index 589f728ff..000000000 --- a/src/net/sourceforge/plantuml/cute/Arc.java +++ /dev/null @@ -1,113 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2020, Arnaud Roques - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://plantuml.com/paypal - * - * This file is part of PlantUML. - * - * PlantUML is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.cute; - -import java.awt.geom.Point2D; - -public class Arc { - - private final Segment segment; - private final Tension tension; - - public Tension getTension() { - return tension; - } - - public Arc(final MyPoint2D a, final MyPoint2D b) { - this(a, b, Tension.none()); - } - - private Arc(final MyPoint2D a, final MyPoint2D b, Tension tension) { - this.segment = new Segment(a, b); - this.tension = tension; - } - - public MyPoint2D getA() { - return (MyPoint2D) segment.getA(); - } - - public MyPoint2D getB() { - return (MyPoint2D) segment.getB(); - } - - public Arc withNoTension() { - return new Arc(getA(), getB(), Tension.none()); - } - - public Arc withTension(String tensionString) { - if (tensionString == null) { - return this; - } - final double newTension = Double.parseDouble(tensionString); - return new Arc(getA(), getB(), new Tension(newTension)); - } - - public Arc rotateZoom(RotationZoom rotationZoom) { - return new Arc(getA().rotateZoom(rotationZoom), getB().rotateZoom(rotationZoom), - tension.rotateZoom(rotationZoom)); - } - -// public void appendTo(UPath path) { -// if (tension.isNone()) { -// path.lineTo(getB()); -// } else { -// final double a = segment.getLength() / 2; -// final double b = getTension().getValue(); -// final double radius = (a * a + b * b) / 2 / b; -// final int sweep_flag = 1; -// path.arcTo(getB(), radius, 0, sweep_flag); -// } -// } - - public Point2D getTensionPoint() { - if (tension.isNone()) { - throw new IllegalArgumentException(); - } - return segment.getOrthoPoint(-tension.getValue()); - } - - // public void appendTo(UPath path) { - // if (path.isEmpty()) { - // path.moveTo(getA()); - // } - // path.lineTo(getB()); - // } - - public double getLength() { - return segment.getLength(); - } - -} diff --git a/src/net/sourceforge/plantuml/cute/Balloon.java b/src/net/sourceforge/plantuml/cute/Balloon.java deleted file mode 100644 index be33794ca..000000000 --- a/src/net/sourceforge/plantuml/cute/Balloon.java +++ /dev/null @@ -1,125 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2020, Arnaud Roques - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://plantuml.com/paypal - * - * This file is part of PlantUML. - * - * PlantUML is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.cute; - -import java.awt.geom.Point2D; - -import net.sourceforge.plantuml.graphic.UDrawable; -import net.sourceforge.plantuml.ugraphic.UEllipse; -import net.sourceforge.plantuml.ugraphic.UGraphic; -import net.sourceforge.plantuml.ugraphic.UTranslate; - -public class Balloon implements UDrawable { - - private final Point2D center; - private final double radius; - - public Balloon(Point2D center, double radius) { - if (radius < 0) { - throw new IllegalArgumentException(); - } - this.center = center; - this.radius = radius; - } - - public static Balloon fromRadiusSegment(Segment centerToContact) { - throw new UnsupportedOperationException(); - } - - public Point2D getPointOnCircle(double a) { - return new Point2D.Double(center.getX() + radius * Math.cos(a), center.getY() + radius * Math.sin(a)); - } - - public Segment getSegmentCenterToPointOnCircle(double a) { - return new Segment(center, getPointOnCircle(a)); - } - - public Balloon translate(UTranslate translate) { - return new Balloon(translate.getTranslated(center), radius); - } - - public Balloon rotate(RotationZoom rotationZoom) { - return new Balloon(rotationZoom.getPoint(center), rotationZoom.applyZoom(radius)); - } - - @Override - public String toString() { - return "Balloon(" + center + "," + radius + ")"; - } - - public Point2D getCenter() { - return center; - } - - public double getRadius() { - return radius; - } - - public void drawU(UGraphic ug) { - UEllipse circle = new UEllipse(2 * radius, 2 * radius); - ug.apply(new UTranslate(center.getX() - circle.getWidth() / 2, center.getY() - circle.getHeight() / 2)).draw( - circle); - } - - public Balloon getInsideTangentBalloon1(double angle, double curvation) { - final double f = radius - curvation; - final double e = (radius * radius - f * f) / 2 / radius; - final RotationZoom rotation = RotationZoom.rotationInRadians(angle); - final Point2D p1 = rotation.getPoint(f, e); - final Point2D newCenter = new Point2D.Double(center.getX() + p1.getX(), center.getY() + p1.getY()); - return new Balloon(newCenter, e); - } - - public Balloon getInsideTangentBalloon2(double angle, double curvation) { - final double f = radius - curvation; - final double e = (radius * radius - f * f) / 2 / radius; - final RotationZoom rotation = RotationZoom.rotationInRadians(angle); - final Point2D p1 = rotation.getPoint(f, -e); - final Point2D newCenter = new Point2D.Double(center.getX() + p1.getX(), center.getY() + p1.getY()); - return new Balloon(newCenter, e); - } - - public Point2D getPointOnCirclePassingByThisPoint(Point2D passingBy) { - final Segment seg = new Segment(center, passingBy); - return seg.getFromAtoB(radius); - } - - public Point2D getPointOnCircleOppositeToThisPoint(Point2D passingBy) { - final Segment seg = new Segment(center, passingBy); - return seg.getFromAtoB(-radius); - } - -} diff --git a/src/net/sourceforge/plantuml/cute/BetweenCorners.java b/src/net/sourceforge/plantuml/cute/BetweenCorners.java deleted file mode 100644 index f090f7b36..000000000 --- a/src/net/sourceforge/plantuml/cute/BetweenCorners.java +++ /dev/null @@ -1,195 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2020, Arnaud Roques - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://plantuml.com/paypal - * - * This file is part of PlantUML. - * - * PlantUML is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.cute; - -import java.awt.geom.Point2D; - -import net.sourceforge.plantuml.ugraphic.UGraphic; -import net.sourceforge.plantuml.ugraphic.UPath; - -public class BetweenCorners { - - private final TriangleCorner corner1; - private final TriangleCorner corner2; - private final Tension tension; - - private Balloon inside1; - private Balloon inside2; - private Balloon contact; - private Balloon apo; - private Point2D apopt1; - private Point2D apopt2; - - public BetweenCorners(TriangleCorner corner1, TriangleCorner corner2, Tension tension) { - this.corner1 = corner1; - this.corner2 = corner2; - this.tension = tension; - - if (corner1.hasCurvation()) { - inside1 = corner1.getBalloonInside(); - } - if (corner2.hasCurvation()) { - inside2 = corner2.getBalloonInside(); - } - if (tension.isNone() == false) { - contact = new Balloon(getTensionPoint(), getLength() / 1000.0); - } - - if (inside1 != null && inside2 != null && contact != null) { - apo = ApolloniusSolver2.solveApollonius(inside1, inside2, contact, 1, 1, 1); - apopt1 = apo.getPointOnCirclePassingByThisPoint(inside1.getCenter()); - apopt2 = apo.getPointOnCirclePassingByThisPoint(inside2.getCenter()); - } - - } - - public Point2D getPointJ() { - if (getCorner1().hasCurvation() == false) { - return getCorner1().getO(); - } - if (tension.isNone()) { - return getCorner1().getOnSegmentA(getCorner1().getCurvation()); - } - throw new UnsupportedOperationException(); - } - - public Point2D getPointK() { - if (getCorner1().hasCurvation() == false) { - return getCorner1().getO(); - } - if (tension.isNone()) { - return getCorner1().getOnSegmentB(getCorner1().getCurvation()); - } - throw new UnsupportedOperationException(); - } - - private double getBalloonRadius() { - return getCorner1().getBalloonInside().getRadius(); - } - - public void initPath(UPath path) { - if (apo != null) { - path.moveTo(apopt2); - } else { - path.moveTo(getPointK()); - } - } - - public void addToPath(UPath path, int swepFlag) { - if (apo != null) { - path.arcTo(apopt1, getCorner1().getBalloonInside().getRadius(), 0, 1); - path.arcTo(apopt2, apo.getRadius(), 0, 1); - // } else if (getTension().isNone()) { - // path.lineTo(getPointJ()); - // if (getCorner2().hasCurvation()) { - // path.arcTo(getPointK(), getBalloonRadius(), 0, swepFlag); - // } - // } else { - // // final int sweep_flag = 1; - // path.arcTo(getPointJ(), getRadiusFuzzy1(), 0, swepFlag); - // if (getCorner2().hasCurvation()) { - // path.arcTo(getPointK(), getBalloonRadius(), 0, swepFlag); - // } - // } - } else { - path.lineTo(getPointJ()); - if (getCorner1().hasCurvation()) { - path.arcTo(getPointK(), getBalloonRadius(), 0, swepFlag); - } - } - } - - public void debugMe(UGraphic ug) { - if (getCorner2().hasCurvation() == false) { - return; - } - if (tension.isNone()) { - return; - } - inside1.drawU(ug); - inside2.drawU(ug); - // getSegment().debugMe(ug); - contact.drawU(ug); - - new Balloon(apopt1, 5).drawU(ug); - new Balloon(apopt2, 5).drawU(ug); - - // getSegmentCross().debugMe(ug); - - apo.drawU(ug); - // - // final Point2D newCenter = getSegmentCross().getOrthoPoint(-50); - // new Segment(newCenter, getCorner1().getBalloonInside().getCenter()).debugMe(ug); - // new Segment(newCenter, getCorner2().getBalloonInside().getCenter()).debugMe(ug); - - } - - private double getRadiusFuzzy1() { - final double a = getLength() / 2; - final double b = getTension().getValue(); - final double radius = (a * a + b * b) / 2 / b; - return radius; - } - - private Segment getSegment() { - return new Segment(getCorner1().getO(), getCorner2().getO()); - } - - private Point2D getTensionPoint() { - return getSegment().getOrthoPoint(getTension().getValue()); - } - - private Segment getSegmentCross() { - return new Segment(getCorner1().getCornerOrBalloonCenter(), getCorner2().getCornerOrBalloonCenter()); - } - - public Tension getTension() { - return tension; - } - - public TriangleCorner getCorner1() { - return corner1; - } - - public TriangleCorner getCorner2() { - return corner2; - } - - public double getLength() { - return getSegment().getLength(); - } - -} diff --git a/src/net/sourceforge/plantuml/cute/Cheese.java b/src/net/sourceforge/plantuml/cute/Cheese.java deleted file mode 100644 index 480f41817..000000000 --- a/src/net/sourceforge/plantuml/cute/Cheese.java +++ /dev/null @@ -1,124 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2020, Arnaud Roques - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://plantuml.com/paypal - * - * This file is part of PlantUML. - * - * PlantUML is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.cute; - -import java.awt.geom.Point2D; - -import net.sourceforge.plantuml.ugraphic.UGraphic; -import net.sourceforge.plantuml.ugraphic.UPath; - -public class Cheese implements CuteShape { - - private final MyDouble radius; - private final MyDouble startAngle; - private final MyDouble endAngle; - private final RotationZoom rotationZoom; - - public Cheese(VarArgs varArgs) { - this.radius = varArgs.getAsMyDouble("radius"); - this.startAngle = varArgs.getAsMyDouble("start").toRadians(); - this.endAngle = varArgs.getAsMyDouble("end").toRadians(); - this.rotationZoom = RotationZoom.none(); - } - - public Cheese(MyDouble radius, MyDouble startAngle, MyDouble endAngle, RotationZoom rotation) { - this.radius = radius; - this.startAngle = startAngle; - this.endAngle = endAngle; - this.rotationZoom = rotation; - } - - public void drawU(UGraphic ug) { - final Balloon balloon = new Balloon(new Point2D.Double(), radius.getValue()) - .rotate(rotationZoom); - - final double angle1 = rotationZoom.applyRotation(startAngle.getValue()); - final double angle2 = rotationZoom.applyRotation(endAngle.getValue()); - - final Point2D ptA = balloon.getPointOnCircle(angle1); - final Point2D ptB = balloon.getPointOnCircle(angle2); - - final UPath path = new UPath(); - final Point2D ptA0; - if (radius.hasCurvation()) { - ptA0 = balloon.getSegmentCenterToPointOnCircle(angle1).getFromAtoB(radius.getCurvation(0)); - path.moveTo(ptA0); - } else { - ptA0 = null; - path.moveTo(balloon.getCenter()); - } - final Balloon insideA; - if (startAngle.hasCurvation()) { - insideA = balloon.getInsideTangentBalloon1(angle1, startAngle.getCurvation(0)); - final Point2D ptA1 = balloon.getSegmentCenterToPointOnCircle(angle1).getFromAtoB( - radius.getValue() - startAngle.getCurvation(0)); - final Point2D ptA2 = balloon.getPointOnCirclePassingByThisPoint(insideA.getCenter()); - path.lineTo(ptA1); - path.arcTo(ptA2, insideA.getRadius(), 0, 1); - } else { - insideA = null; - path.lineTo(ptA); - } - final Balloon insideB; - if (endAngle.hasCurvation()) { - insideB = balloon.getInsideTangentBalloon2(angle2, endAngle.getCurvation(0)); - final Point2D ptB1 = balloon.getPointOnCirclePassingByThisPoint(insideB.getCenter()); - final Point2D ptB2 = balloon.getSegmentCenterToPointOnCircle(angle2).getFromAtoB( - radius.getValue() - endAngle.getCurvation(0)); - - path.arcTo(ptB1, balloon.getRadius(), 0, 1); - path.arcTo(ptB2, insideB.getRadius(), 0, 1); - } else { - insideB = null; - path.arcTo(ptB, balloon.getRadius(), 0, 1); - } - if (radius.hasCurvation()) { - final Point2D ptB0 = balloon.getSegmentCenterToPointOnCircle(angle2).getFromAtoB(radius.getCurvation(0)); - path.lineTo(ptB0); - path.arcTo(ptA0, radius.getCurvation(0), 0, 1); - } else { - path.lineTo(balloon.getCenter()); - } - path.closePath(); - ug.draw(path); - - } - - public CuteShape rotateZoom(RotationZoom other) { - return new Cheese(radius, startAngle, endAngle, rotationZoom.compose(other)); - } - -} diff --git a/src/net/sourceforge/plantuml/cute/Circle.java b/src/net/sourceforge/plantuml/cute/Circle.java deleted file mode 100644 index de53d4b73..000000000 --- a/src/net/sourceforge/plantuml/cute/Circle.java +++ /dev/null @@ -1,66 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2020, Arnaud Roques - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://plantuml.com/paypal - * - * This file is part of PlantUML. - * - * PlantUML is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.cute; - -import net.sourceforge.plantuml.ugraphic.UEllipse; -import net.sourceforge.plantuml.ugraphic.UGraphic; -import net.sourceforge.plantuml.ugraphic.UTranslate; - -public class Circle implements CuteShape { - - private final double radius; - - public Circle(VarArgs varArgs) { - this.radius = varArgs.getAsDouble("radius"); - } - - private Circle(double radius) { - this.radius = radius; - } - - public void drawU(UGraphic ug) { - ug = ug.apply(new UTranslate(-radius, -radius)); - ug.draw(new UEllipse(2 * radius, 2 * radius)); - } - - public Circle rotateZoom(RotationZoom rotationZoom) { - if (rotationZoom.isNone()) { - return this; - } - return new Circle(rotationZoom.applyZoom(radius)); - } - -} diff --git a/src/net/sourceforge/plantuml/cute/Corner.java b/src/net/sourceforge/plantuml/cute/Corner.java deleted file mode 100644 index f471fb132..000000000 --- a/src/net/sourceforge/plantuml/cute/Corner.java +++ /dev/null @@ -1,46 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2020, Arnaud Roques - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://plantuml.com/paypal - * - * This file is part of PlantUML. - * - * PlantUML is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.cute; - -public class Corner { - - private final double curvation; - - public Corner(double curvation) { - this.curvation = curvation; - } - -} diff --git a/src/net/sourceforge/plantuml/cute/Crossing.java b/src/net/sourceforge/plantuml/cute/Crossing.java deleted file mode 100644 index 1b472df84..000000000 --- a/src/net/sourceforge/plantuml/cute/Crossing.java +++ /dev/null @@ -1,68 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2020, Arnaud Roques - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://plantuml.com/paypal - * - * This file is part of PlantUML. - * - * PlantUML is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.cute; - -import java.awt.geom.Point2D; -import java.util.ArrayList; -import java.util.List; - -import net.sourceforge.plantuml.ugraphic.UTranslate; - -public class Crossing { - - private final Balloon balloon; - private final InfiniteLine line; - - public Crossing(Balloon balloon, InfiniteLine line) { - this.balloon = balloon; - this.line = line; - } - - public List intersection() { - final List result = new ArrayList(); - - final UTranslate tr = new UTranslate(balloon.getCenter()); - final UTranslate trInverse = tr.reverse(); - - final CrossingSimple simple = new CrossingSimple(balloon.getRadius(), line.translate(trInverse)); - for (Point2D pt : simple.intersection()) { - result.add(tr.getTranslated(pt)); - } - - return result; - } - -} diff --git a/src/net/sourceforge/plantuml/cute/CrossingSegment.java b/src/net/sourceforge/plantuml/cute/CrossingSegment.java deleted file mode 100644 index ce3fd1ccf..000000000 --- a/src/net/sourceforge/plantuml/cute/CrossingSegment.java +++ /dev/null @@ -1,73 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2020, Arnaud Roques - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://plantuml.com/paypal - * - * This file is part of PlantUML. - * - * PlantUML is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.cute; - -import java.awt.geom.Point2D; -import java.util.ArrayList; -import java.util.List; - -import net.sourceforge.plantuml.geom.LineSegmentDouble; -import net.sourceforge.plantuml.ugraphic.UTranslate; - -public class CrossingSegment { - - private final Balloon balloon; - private final LineSegmentDouble segment; - - public CrossingSegment(Balloon balloon, LineSegmentDouble segment) { - this.balloon = balloon; - this.segment = segment; - } - - public List intersection() { - final List result = new ArrayList(); - - final UTranslate tr = new UTranslate(balloon.getCenter()); - final UTranslate trInverse = tr.reverse(); - - final CrossingSimple simple = new CrossingSimple(balloon.getRadius(), - new InfiniteLine(segment).translate(trInverse)); - for (Point2D pt : simple.intersection()) { - pt = tr.getTranslated(pt); - if (segment.isPointOnSegment(pt)) { - result.add(pt); - } - } - - return result; - } - -} diff --git a/src/net/sourceforge/plantuml/cute/CrossingSimple.java b/src/net/sourceforge/plantuml/cute/CrossingSimple.java deleted file mode 100644 index 5c0b22723..000000000 --- a/src/net/sourceforge/plantuml/cute/CrossingSimple.java +++ /dev/null @@ -1,91 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2020, Arnaud Roques - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://plantuml.com/paypal - * - * This file is part of PlantUML. - * - * PlantUML is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.cute; - -import java.awt.geom.Point2D; -import java.util.ArrayList; -import java.util.List; - -public class CrossingSimple { - - // http://mathworld.wolfram.com/Circle-LineIntersection.html - - private final double radius; - private final InfiniteLine line; - - public CrossingSimple(double radius, InfiniteLine line) { - this.radius = radius; - this.line = line; - } - - private double pow2(double x) { - return x * x; - } - - private double sgn(double x) { - if (x < 0) { - return -1; - } - return 1; - } - - public List intersection() { - final List result = new ArrayList(); - final double delta = pow2(radius * line.getDr()) - pow2(line.getDiscriminant()); - - if (delta < 0) { - return result; - } - - double x; - double y; - - x = (line.getDiscriminant() * line.getDeltaY() + sgn(line.getDeltaY()) * line.getDeltaX() * Math.sqrt(delta)) - / pow2(line.getDr()); - y = (-line.getDiscriminant() * line.getDeltaX() + Math.abs(line.getDeltaY()) * Math.sqrt(delta)) - / pow2(line.getDr()); - result.add(new Point2D.Double(x, y)); - - x = (line.getDiscriminant() * line.getDeltaY() - sgn(line.getDeltaY()) * line.getDeltaX() * Math.sqrt(delta)) - / pow2(line.getDr()); - y = (-line.getDiscriminant() * line.getDeltaX() - Math.abs(line.getDeltaY()) * Math.sqrt(delta)) - / pow2(line.getDr()); - result.add(new Point2D.Double(x, y)); - - return result; - } - -} diff --git a/src/net/sourceforge/plantuml/cute/CutePath.java b/src/net/sourceforge/plantuml/cute/CutePath.java deleted file mode 100644 index c2d314364..000000000 --- a/src/net/sourceforge/plantuml/cute/CutePath.java +++ /dev/null @@ -1,179 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2020, Arnaud Roques - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://plantuml.com/paypal - * - * This file is part of PlantUML. - * - * PlantUML is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.cute; - -import java.awt.geom.Point2D; -import java.util.ArrayList; -import java.util.List; -import java.util.StringTokenizer; - -import net.sourceforge.plantuml.ugraphic.UGraphic; -import net.sourceforge.plantuml.ugraphic.UPath; -import net.sourceforge.plantuml.ugraphic.color.HColorNone; -import net.sourceforge.plantuml.ugraphic.color.HColorUtils; - -public class CutePath { - - private final List arcs = new ArrayList(); - - public CutePath(String value) { - - MyPoint2D lastAdded = null; - String tension = null; - - final StringTokenizer spl = new StringTokenizer(value, "~:", true); - while (spl.hasMoreTokens()) { - final String token = spl.nextToken(); - if (token.equals(":")) { - continue; - } else if (token.equals("~")) { - tension = spl.nextToken(); - final String next = spl.nextToken(); - if (next.equals("~") == false) { - throw new IllegalArgumentException(); - } - } else { - final StringTokenizer st = new StringTokenizer(token.replaceAll("[()]", ""), ",^"); - final MyPoint2D current = new MyPoint2D(st); - if (lastAdded != null) { - add(new Arc(lastAdded, current).withTension(tension)); - } - lastAdded = current; - tension = null; - } - } - add(new Arc(lastAdded, arcs.get(0).getA()).withTension(tension)); - - } - - public CutePath() { - } - - public void add(Arc arc) { - if (arcs.size() > 0) { - final Arc last = arcs.get(arcs.size() - 1); - if (last.getB().equals(arc.getA()) == false) { - throw new IllegalArgumentException("last=" + last.getB() + " arc=" + arc.getA()); - } - } - this.arcs.add(arc); - } - - private final MyPoint2D getMyPoint2D(int i) { - return getArc(i).getA(); - } - - private Arc getArc(int i) { - if (i == -1) { - return arcs.get(arcs.size() - 1); - } - if (i == arcs.size()) { - return arcs.get(0); - } - if (i == arcs.size() + 1) { - return arcs.get(1); - } - return arcs.get(i); - } - - private UPath toUPath() { - final TriangleCorner corner0 = new TriangleCorner(getMyPoint2D(0), getMyPoint2D(1), getMyPoint2D(2)); - final int swepFlag = corner0.determinant() < 0 ? 0 : 1; - - final UPath path = new UPath(); - final BetweenCorners betweenCornersLast = new BetweenCorners(getCorner(arcs.size() - 1), - getCorner(arcs.size()), arcs.get(arcs.size() - 1).getTension()); - betweenCornersLast.initPath(path); - for (int i = 0; i < arcs.size(); i++) { - - // if (i == 0) { - // if (getMyPoint2D(i).hasCurvation()) { - // path.moveTo(getPointK(i)); - // } else { - // path.moveTo(arcs.get(i).getA()); - // } - // } - - final BetweenCorners betweenCorners = new BetweenCorners(getCorner(i), getCorner(i + 1), arcs.get(i) - .getTension()); - betweenCorners.addToPath(path, swepFlag); - - } - path.closePath(); - return path; - } - - private void debugMe(UGraphic ug) { - for (int i = 0; i < arcs.size(); i++) { - final BetweenCorners betweenCorners = new BetweenCorners(getCorner(i), getCorner(i + 1), arcs.get(i) - .getTension()); - betweenCorners.debugMe(ug.apply(HColorUtils.BLACK).apply(new HColorNone().bg())); - } - } - - private Point2D getPointK(final int j) { - if (getMyPoint2D(j).hasCurvation()) { - return getCorner(j).getOnSegmentB(getMyPoint2D(j).getCurvation(0)); - } - return arcs.get(j - 1).getB(); - } - - private TriangleCorner getCorner(int i) { - return new TriangleCorner(getMyPoint2D(i), getMyPoint2D(i - 1), getMyPoint2D(i + 1)); - } - - public void drawU(UGraphic ug) { - final UPath path = toUPath(); - ug.draw(path); -// debugMe(ug); - } - - public CutePath rotateZoom(RotationZoom rotationZoom) { - final CutePath result = new CutePath(); - for (Arc arc : arcs) { - result.arcs.add(arc.rotateZoom(rotationZoom)); - } - return result; - } - - public CutePath withNoTension() { - final CutePath result = new CutePath(); - for (Arc arc : arcs) { - result.arcs.add(arc.withNoTension()); - } - return result; - } -} diff --git a/src/net/sourceforge/plantuml/cute/CuteShape.java b/src/net/sourceforge/plantuml/cute/CuteShape.java deleted file mode 100644 index dff2d8a9f..000000000 --- a/src/net/sourceforge/plantuml/cute/CuteShape.java +++ /dev/null @@ -1,44 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2020, Arnaud Roques - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://plantuml.com/paypal - * - * This file is part of PlantUML. - * - * PlantUML is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.cute; - -import net.sourceforge.plantuml.graphic.UDrawable; - -public interface CuteShape extends UDrawable { - - public UDrawable rotateZoom(RotationZoom other); - -} diff --git a/src/net/sourceforge/plantuml/cute/CuteShapeFactory.java b/src/net/sourceforge/plantuml/cute/CuteShapeFactory.java deleted file mode 100644 index 20f93328d..000000000 --- a/src/net/sourceforge/plantuml/cute/CuteShapeFactory.java +++ /dev/null @@ -1,84 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2020, Arnaud Roques - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://plantuml.com/paypal - * - * This file is part of PlantUML. - * - * PlantUML is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.cute; - -import java.util.Map; - -import net.sourceforge.plantuml.StringUtils; - -public class CuteShapeFactory { - - private final Map groups; - - public CuteShapeFactory(Map groups) { - this.groups = groups; - - } - - public Positionned createCuteShapePositionned(String data) { - final VarArgs varArgs = new VarArgs(data); - return new PositionnedImpl(createCuteShape(data), varArgs); - } - - private CuteShape createCuteShape(String data) { - data = StringUtils.trin(data.toLowerCase()); - final VarArgs varArgs = new VarArgs(data); - if (data.startsWith("circle ")) { - return new Circle(varArgs); - } - if (data.startsWith("cheese ")) { - return new Cheese(varArgs); - } - if (data.startsWith("stick ")) { - return new Stick(varArgs); - } - if (data.startsWith("rectangle ") || data.startsWith("rect ")) { - return new Rectangle(varArgs); - } - if (data.startsWith("triangle ")) { - return new Triangle(varArgs); - } - final String first = data.split(" ")[0]; - // System.err.println("Looking for group " + first + " in " + groups.keySet()); - final Group group = groups.get(first); - if (group == null) { - throw new IllegalArgumentException("Cannot find group " + first + " in " + groups.keySet()); - } - // System.err.println("Found group " + first + " in " + groups.keySet()); - return group; - } - -} diff --git a/src/net/sourceforge/plantuml/cute/Group.java b/src/net/sourceforge/plantuml/cute/Group.java deleted file mode 100644 index 883a33517..000000000 --- a/src/net/sourceforge/plantuml/cute/Group.java +++ /dev/null @@ -1,126 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2020, Arnaud Roques - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://plantuml.com/paypal - * - * This file is part of PlantUML. - * - * PlantUML is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.cute; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import net.sourceforge.plantuml.ugraphic.UGraphic; -import net.sourceforge.plantuml.ugraphic.UTranslate; - -public class Group implements Positionned { - - private final String groupName; - private final List shapes; - private final Group parent; - private final Map children; - - // private final List children = new ArrayList(); - - @Override - public String toString() { - return "Group " + groupName + " (" + shapes.size() + ") "; - } - - // public static Group fromList(List shapes) { - // return new Group("Automatic", shapes); - // } - - public static Group createRoot() { - return new Group(null, "ROOT"); - } - - private Group(Group parent, String groupName) { - this.parent = parent; - this.groupName = groupName; - this.shapes = new ArrayList(); - this.children = new HashMap(); - } - - private Group(Group parent, String groupName, List shapes) { - this.parent = parent; - this.groupName = groupName; - this.shapes = shapes; - this.children = null; - } - - public Group createChild(String childName) { - final Group result = new Group(this, childName); - this.children.put(childName, result); - return result; - } - - public void drawU(UGraphic ug) { - for (Positionned shape : shapes) { - shape.drawU(ug); - } - } - - public void add(Positionned shape) { - shapes.add(shape); - } - - public String getName() { - return groupName; - } - - public Positionned rotateZoom(RotationZoom rotationZoom) { - if (rotationZoom.isNone()) { - return this; - } - final List result = new ArrayList(); - for (Positionned shape : shapes) { - result.add(shape.rotateZoom(rotationZoom)); - } - return new Group(parent, groupName + "->" + rotationZoom, result); - } - - public Positionned translate(UTranslate translation) { - throw new UnsupportedOperationException(); - } - - public Group getParent() { - return parent; - } - - public Map getChildren() { - return Collections.unmodifiableMap(children); - } - -} diff --git a/src/net/sourceforge/plantuml/cute/InfiniteLine.java b/src/net/sourceforge/plantuml/cute/InfiniteLine.java deleted file mode 100644 index aa7f06d8f..000000000 --- a/src/net/sourceforge/plantuml/cute/InfiniteLine.java +++ /dev/null @@ -1,82 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2020, Arnaud Roques - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://plantuml.com/paypal - * - * This file is part of PlantUML. - * - * PlantUML is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.cute; - -import java.awt.geom.Point2D; - -import net.sourceforge.plantuml.geom.AbstractLineSegment; -import net.sourceforge.plantuml.ugraphic.UTranslate; - -public class InfiniteLine { - - private final Point2D a; - private final Point2D b; - - public InfiniteLine(Point2D a, Point2D b) { - this.a = a; - this.b = b; - } - - public InfiniteLine(AbstractLineSegment segment) { - this(segment.getP1(), segment.getP2()); - } - - @Override - public String toString() { - return "{" + a + ";" + b + "}"; - } - - public double getDeltaX() { - return b.getX() - a.getX(); - } - - public double getDeltaY() { - return b.getY() - a.getY(); - } - - public double getDr() { - return a.distance(b); - } - - public double getDiscriminant() { - return a.getX() * b.getY() - b.getX() * a.getY(); - } - - public InfiniteLine translate(UTranslate translate) { - return new InfiniteLine(translate.getTranslated(a), translate.getTranslated(b)); - } - -} diff --git a/src/net/sourceforge/plantuml/cute/MyDouble.java b/src/net/sourceforge/plantuml/cute/MyDouble.java deleted file mode 100644 index 8595ca2d2..000000000 --- a/src/net/sourceforge/plantuml/cute/MyDouble.java +++ /dev/null @@ -1,91 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2020, Arnaud Roques - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://plantuml.com/paypal - * - * This file is part of PlantUML. - * - * PlantUML is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.cute; - -import java.util.StringTokenizer; - -public class MyDouble { - - private static final double NO_CURVE = java.lang.Double.MIN_VALUE; - private final double value; - private final double curvation; - - public MyDouble(String s) { - final StringTokenizer st = new StringTokenizer(s, ","); - this.value = java.lang.Double.parseDouble(st.nextToken()); - if (st.hasMoreTokens()) { - this.curvation = java.lang.Double.parseDouble(st.nextToken()); - } else { - this.curvation = NO_CURVE; - } - } - - @Override - public String toString() { - return value + "[" + curvation + "]"; - } - - private MyDouble(double value, double curvation) { - this.value = value; - this.curvation = curvation; - } - - public double getCurvation(double def) { - if (curvation == NO_CURVE) { - return def; - } - return curvation; - } - - public double getValue() { - return value; - } - - public boolean hasCurvation() { - return curvation != NO_CURVE; - } - - public MyDouble rotateZoom(RotationZoom rotationZoom) { - final double newValue = rotationZoom.applyZoom(value); - final double curvation = this.curvation == NO_CURVE ? NO_CURVE : rotationZoom.applyZoom(this.curvation); - return new MyDouble(newValue, curvation); - } - - public MyDouble toRadians() { - return new MyDouble(Math.toRadians(value), curvation); - } - -} diff --git a/src/net/sourceforge/plantuml/cute/MyPoint2D.java b/src/net/sourceforge/plantuml/cute/MyPoint2D.java deleted file mode 100644 index b48707fed..000000000 --- a/src/net/sourceforge/plantuml/cute/MyPoint2D.java +++ /dev/null @@ -1,121 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2020, Arnaud Roques - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://plantuml.com/paypal - * - * This file is part of PlantUML. - * - * PlantUML is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.cute; - -import java.awt.geom.Point2D; -import java.util.StringTokenizer; - -public class MyPoint2D extends Point2D { - - public static final double NO_CURVE = 0; - private final double x; - private final double y; - private final double curvation; - - public MyPoint2D(StringTokenizer st) { - this.x = java.lang.Double.parseDouble(st.nextToken()); - this.y = java.lang.Double.parseDouble(st.nextToken()); - if (st.hasMoreTokens()) { - this.curvation = java.lang.Double.parseDouble(st.nextToken()); - } else { - this.curvation = NO_CURVE; - } - } - - @Override - public boolean equals(Object arg0) { - final MyPoint2D other = (MyPoint2D) arg0; - return this.x == other.x && this.y == other.y && this.curvation == other.curvation; - } - - public static MyPoint2D from(double x, double y) { - return new MyPoint2D(x, y, NO_CURVE); - } - - public MyPoint2D withCurvation(double curvation) { - if (curvation == NO_CURVE) { - return this; - } - return new MyPoint2D(x, y, curvation); - } - - private MyPoint2D(Point2D p, double curvation) { - this.x = p.getX(); - this.y = p.getY(); - this.curvation = curvation; - } - - private MyPoint2D(double x, double y, double curvation) { - this.x = x; - this.y = y; - this.curvation = curvation; - } - - @Override - public String toString() { - return "(" + x + "," + y + ")"; - } - - public double getCurvation(double def) { - if (curvation == NO_CURVE) { - return def; - } - return curvation; - } - - public double getX() { - return x; - } - - public double getY() { - return y; - } - - public void setLocation(double arg0, double arg1) { - throw new UnsupportedOperationException(); - } - - public MyPoint2D rotateZoom(RotationZoom rotationZoom) { - final Point2D p = rotationZoom.getPoint(x, y); - final double curvation = this.curvation == NO_CURVE ? NO_CURVE : rotationZoom.applyZoom(this.curvation); - return new MyPoint2D(p, curvation); - } - - public boolean hasCurvation() { - return curvation != NO_CURVE; - } - -} diff --git a/src/net/sourceforge/plantuml/cute/PSystemCute.java b/src/net/sourceforge/plantuml/cute/PSystemCute.java deleted file mode 100644 index b9beedd4a..000000000 --- a/src/net/sourceforge/plantuml/cute/PSystemCute.java +++ /dev/null @@ -1,109 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2020, Arnaud Roques - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://plantuml.com/paypal - * - * This file is part of PlantUML. - * - * PlantUML is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.cute; - -import java.io.IOException; -import java.io.OutputStream; -import java.util.StringTokenizer; - -import net.sourceforge.plantuml.AbstractPSystem; -import net.sourceforge.plantuml.FileFormatOption; -import net.sourceforge.plantuml.SkinParam; -import net.sourceforge.plantuml.StringUtils; -import net.sourceforge.plantuml.UseStyle; -import net.sourceforge.plantuml.core.DiagramDescription; -import net.sourceforge.plantuml.core.ImageData; -import net.sourceforge.plantuml.style.ClockwiseTopRightBottomLeft; -import net.sourceforge.plantuml.ugraphic.ImageBuilder; -import net.sourceforge.plantuml.ugraphic.ImageParameter; -import net.sourceforge.plantuml.ugraphic.color.ColorMapperIdentity; - -public class PSystemCute extends AbstractPSystem { - - // private final List shapes = new ArrayList(); - // private final Map groups = new HashMap(); - private final Group root = Group.createRoot(); - private Group currentGroup = root; - - public PSystemCute() { - } - - public DiagramDescription getDescription() { - return new DiagramDescription("(Cute)"); - } - - public void doCommandLine(String line) { - line = StringUtils.trin(line); - if (line.length() == 0 || line.startsWith("'")) { - return; - } - if (line.startsWith("group ")) { - final StringTokenizer st = new StringTokenizer(line); - st.nextToken(); - final String groupName = st.nextToken(); - currentGroup = currentGroup.createChild(groupName); - } else if (line.startsWith("}")) { - currentGroup = currentGroup.getParent(); - } else { - final Positionned shape = new CuteShapeFactory(currentGroup.getChildren()).createCuteShapePositionned(line); - // if (currentGroup == null) { - // shapes.add(shape); - // } else { - currentGroup.add(shape); - // } - } - } - - @Override - final protected ImageData exportDiagramNow(OutputStream os, int num, FileFormatOption fileFormat, long seed) - throws IOException { - final int margin1; - final int margin2; - if (UseStyle.useBetaStyle()) { - margin1 = SkinParam.zeroMargin(10); - margin2 = SkinParam.zeroMargin(10); - } else { - margin1 = 10; - margin2 = 10; - } - final ClockwiseTopRightBottomLeft margins = ClockwiseTopRightBottomLeft.margin1margin2(margin1, margin2); - final ImageParameter imageParameter = new ImageParameter(new ColorMapperIdentity(), false, null, null, - null, margins, null); - final ImageBuilder builder = ImageBuilder.build(imageParameter); - builder.setUDrawable(root); - return builder.writeImageTOBEMOVED(fileFormat, seed, os); - } -} diff --git a/src/net/sourceforge/plantuml/cute/PSystemCuteFactory.java b/src/net/sourceforge/plantuml/cute/PSystemCuteFactory.java deleted file mode 100644 index 3da894135..000000000 --- a/src/net/sourceforge/plantuml/cute/PSystemCuteFactory.java +++ /dev/null @@ -1,61 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2020, Arnaud Roques - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://plantuml.com/paypal - * - * This file is part of PlantUML. - * - * PlantUML is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.cute; - -import net.sourceforge.plantuml.command.PSystemBasicFactory; -import net.sourceforge.plantuml.core.DiagramType; - -public class PSystemCuteFactory extends PSystemBasicFactory { - - public PSystemCuteFactory(DiagramType type) { - super(type); - } - - public PSystemCute init(String startLine) { - if (getDiagramType() == DiagramType.CUTE) { - return new PSystemCute(); - } - - return null; - } - - @Override - public PSystemCute executeLine(PSystemCute system, String line) { - system.doCommandLine(line); - return system; - } - -} diff --git a/src/net/sourceforge/plantuml/cute/Positionned.java b/src/net/sourceforge/plantuml/cute/Positionned.java deleted file mode 100644 index cda27eb70..000000000 --- a/src/net/sourceforge/plantuml/cute/Positionned.java +++ /dev/null @@ -1,46 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2020, Arnaud Roques - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://plantuml.com/paypal - * - * This file is part of PlantUML. - * - * PlantUML is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.cute; - -import net.sourceforge.plantuml.ugraphic.UTranslate; - -public interface Positionned extends CuteShape { - - public Positionned rotateZoom(RotationZoom rotation); - - public Positionned translate(UTranslate translation); - -} diff --git a/src/net/sourceforge/plantuml/cute/PositionnedImpl.java b/src/net/sourceforge/plantuml/cute/PositionnedImpl.java deleted file mode 100644 index aa7b1febe..000000000 --- a/src/net/sourceforge/plantuml/cute/PositionnedImpl.java +++ /dev/null @@ -1,105 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2020, Arnaud Roques - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://plantuml.com/paypal - * - * This file is part of PlantUML. - * - * PlantUML is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.cute; - -import net.sourceforge.plantuml.graphic.UDrawable; -import net.sourceforge.plantuml.ugraphic.UGraphic; -import net.sourceforge.plantuml.ugraphic.UTranslate; -import net.sourceforge.plantuml.ugraphic.color.HColor; -import net.sourceforge.plantuml.ugraphic.color.HColorUtils; - -public class PositionnedImpl implements Positionned { - - private final CuteShape cuteShape; - private final HColor color; - private final UTranslate position; - private final RotationZoom rotationZoom; - - @Override - public String toString() { - return "Positionned " + position + " " + cuteShape; - } - - public PositionnedImpl(CuteShape cuteShape, VarArgs args) { - this.cuteShape = cuteShape; - this.color = args.getAsColor("color"); - this.position = args.getPosition(); - this.rotationZoom = RotationZoom.fromVarArgs(args); - } - - private PositionnedImpl(CuteShape cuteShape, HColor color, UTranslate position, RotationZoom rotationZoom) { - this.cuteShape = cuteShape; - this.color = color; - this.position = position; - this.rotationZoom = rotationZoom; - } - - public PositionnedImpl(Group group, RotationZoom rotation) { - this.cuteShape = group; - this.color = HColorUtils.BLACK; - this.position = new UTranslate(); - this.rotationZoom = rotation; - } - - public PositionnedImpl(Group group, UTranslate translation) { - this.cuteShape = group; - this.color = HColorUtils.BLACK; - this.position = translation; - this.rotationZoom = RotationZoom.none(); - } - - private UGraphic applyColor(UGraphic ug) { - return ug.apply(color.bg()).apply(color); - - } - - public void drawU(UGraphic ug) { - ug = applyColor(ug); - ug = ug.apply(position); - final UDrawable tmp = rotationZoom.isNone() ? cuteShape : cuteShape.rotateZoom(rotationZoom); - // System.err.println("rotationZoom=" + rotationZoom + " tmp=" + tmp); - tmp.drawU(ug); - } - - public Positionned rotateZoom(RotationZoom other) { - return new PositionnedImpl(cuteShape, color, other.getUTranslate(position), rotationZoom.compose(other)); - } - - public Positionned translate(UTranslate other) { - return new PositionnedImpl(cuteShape, color, position.compose(other), rotationZoom); - } - -} diff --git a/src/net/sourceforge/plantuml/cute/Rectangle.java b/src/net/sourceforge/plantuml/cute/Rectangle.java deleted file mode 100644 index e5aa37451..000000000 --- a/src/net/sourceforge/plantuml/cute/Rectangle.java +++ /dev/null @@ -1,106 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2020, Arnaud Roques - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://plantuml.com/paypal - * - * This file is part of PlantUML. - * - * PlantUML is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.cute; - -import java.awt.geom.Point2D; - -import net.sourceforge.plantuml.ugraphic.UGraphic; -import net.sourceforge.plantuml.ugraphic.UPath; - -public class Rectangle implements CuteShape { - - private final double width; - private final double height; - private final RotationZoom rotationZoom; - private final double curvation; - - public Rectangle(VarArgs varArgs) { - final Point2D dim = varArgs.getAsPoint("dimension"); - this.width = dim.getX(); - this.height = dim.getY(); - this.rotationZoom = RotationZoom.none(); - this.curvation = varArgs.getAsDouble("curve", MyPoint2D.NO_CURVE); - } - - private Rectangle(double width, double height, RotationZoom rotationZoom, double curvation) { - this.width = width; - this.height = height; - this.rotationZoom = rotationZoom; - this.curvation = curvation; - } - - public void drawU(UGraphic ug) { - CutePath cutePath = new CutePath(); - cutePath.add(new Arc(MyPoint2D.from(0, 0).withCurvation(curvation), MyPoint2D.from(width, 0).withCurvation( - curvation))); - cutePath.add(new Arc(MyPoint2D.from(width, 0).withCurvation(curvation), MyPoint2D.from(width, height) - .withCurvation(curvation))); - cutePath.add(new Arc(MyPoint2D.from(width, height).withCurvation(curvation), MyPoint2D.from(0, height) - .withCurvation(curvation))); - cutePath.add(new Arc(MyPoint2D.from(0, height).withCurvation(curvation), MyPoint2D.from(0, 0).withCurvation( - curvation))); - cutePath = cutePath.rotateZoom(rotationZoom); - cutePath.drawU(ug); - } - - public void drawUOld(UGraphic ug) { - final UPath path = new UPath(); - if (curvation == MyPoint2D.NO_CURVE) { - path.moveTo(rotationZoom.getPoint(0, 0)); - path.lineTo(rotationZoom.getPoint(width, 0)); - path.lineTo(rotationZoom.getPoint(width, height)); - path.lineTo(rotationZoom.getPoint(0, height)); - path.lineTo(rotationZoom.getPoint(0, 0)); - } else { - path.moveTo(rotationZoom.getPoint(width, curvation)); - path.lineTo(rotationZoom.getPoint(width, height - curvation)); - path.arcTo(rotationZoom.getPoint(width - curvation, height), curvation, 0, 1); - path.lineTo(rotationZoom.getPoint(curvation, height)); - path.arcTo(rotationZoom.getPoint(0, height - curvation), curvation, 0, 1); - path.lineTo(rotationZoom.getPoint(0, curvation)); - path.arcTo(rotationZoom.getPoint(curvation, 0), curvation, 0, 1); - path.lineTo(rotationZoom.getPoint(width - curvation, 0)); - path.arcTo(rotationZoom.getPoint(width, curvation), curvation, 0, 1); - } - path.closePath(); - ug.draw(path); - } - - public Rectangle rotateZoom(RotationZoom other) { - return new Rectangle(width, height, rotationZoom.compose(other), curvation); - } - -} diff --git a/src/net/sourceforge/plantuml/cute/RotationZoom.java b/src/net/sourceforge/plantuml/cute/RotationZoom.java deleted file mode 100644 index 6f905538a..000000000 --- a/src/net/sourceforge/plantuml/cute/RotationZoom.java +++ /dev/null @@ -1,129 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2020, Arnaud Roques - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://plantuml.com/paypal - * - * This file is part of PlantUML. - * - * PlantUML is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.cute; - -import java.awt.geom.Point2D; - -import net.sourceforge.plantuml.ugraphic.UTranslate; - -public class RotationZoom { - - private final double angle; - private final double zoom; - - private RotationZoom(double angle, double zoom) { - if (zoom < 0) { - throw new IllegalArgumentException(); - } - this.angle = angle; - this.zoom = zoom; - } - - public RotationZoom compose(RotationZoom other) { - return new RotationZoom(this.angle + other.angle, this.zoom * other.zoom); - } - - @Override - public String toString() { - return "Rotation=" + Math.toDegrees(angle) + " Zoom=" + zoom; - } - - public static RotationZoom fromVarArgs(VarArgs varArgs) { - final double radians = Math.toRadians(varArgs.getAsDouble("rotation", 0)); - final double scale = varArgs.getAsDouble("scale", 1); - return new RotationZoom(radians, scale); - } - - public static RotationZoom rotationInDegrees(double angle) { - return new RotationZoom(Math.toRadians(angle), 1); - } - - public static RotationZoom rotationInRadians(double angle) { - return new RotationZoom(angle, 1); - } - - public static RotationZoom zoom(double zoom) { - return new RotationZoom(0, zoom); - } - - public RotationZoom inverse() { - return new RotationZoom(-angle, 1 / zoom); - } - - public double getAngleDegree() { - return Math.toDegrees(angle); - } - - static public RotationZoom builtRotationOnYaxis(Point2D toRotate) { - final double a = Math.atan2(toRotate.getX(), toRotate.getY()); - return new RotationZoom(a, 1); - } - - public Point2D.Double getPoint(double x, double y) { - if (angle == 0) { - return new Point2D.Double(x * zoom, y * zoom); - } - final double x1 = Math.cos(angle) * x - Math.sin(angle) * y; - final double y1 = Math.sin(angle) * x + Math.cos(angle) * y; - return new Point2D.Double(x1 * zoom, y1 * zoom); - } - - public Point2D getPoint(Point2D p) { - return getPoint(p.getX(), p.getY()); - } - - public UTranslate getUTranslate(UTranslate translate) { - return new UTranslate(getPoint(translate.getDx(), translate.getDy())); - - } - - public static RotationZoom none() { - return new RotationZoom(0, 1); - } - - public boolean isNone() { - return angle == 0 && zoom == 1; - } - - public double applyZoom(double value) { - return value * zoom; - } - - public double applyRotation(double alpha) { - return angle + alpha; - } - -} diff --git a/src/net/sourceforge/plantuml/cute/Segment.java b/src/net/sourceforge/plantuml/cute/Segment.java deleted file mode 100644 index 475920ff3..000000000 --- a/src/net/sourceforge/plantuml/cute/Segment.java +++ /dev/null @@ -1,110 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2020, Arnaud Roques - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://plantuml.com/paypal - * - * This file is part of PlantUML. - * - * PlantUML is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.cute; - -import java.awt.geom.Point2D; - -import net.sourceforge.plantuml.ugraphic.UGraphic; -import net.sourceforge.plantuml.ugraphic.ULine; -import net.sourceforge.plantuml.ugraphic.UTranslate; - -public class Segment { - - private final Point2D a; - private final Point2D b; - private final double length; - - public Segment(Point2D a, Point2D b) { - this.a = a; - this.b = b; - this.length = a.distance(b); - if (length < 0.0001) { - throw new IllegalArgumentException(); - } - } - - public Point2D getFromAtoB(double dist) { - final double dx = b.getX() - a.getX(); - final double dy = b.getY() - a.getY(); - final double coef = dist / length; - final double x = dx * coef; - final double y = dy * coef; - return new Point2D.Double(a.getX() + x, a.getY() + y); - } - - public Point2D getA() { - return a; - } - - public Point2D getB() { - return b; - } - - public Point2D getMiddle() { - return new Point2D.Double((a.getX() + b.getX()) / 2, (a.getY() + b.getY()) / 2); - } - - private Point2D orthoDirection() { - final double dx = b.getX() - a.getX(); - final double dy = b.getY() - a.getY(); - return new Point2D.Double(-dy / length, dx / length); - } - - public Point2D getOrthoPoint(double value) { - final Point2D ortho = orthoDirection(); - final double dx = -ortho.getX() * value; - final double dy = -ortho.getY() * value; - return new Point2D.Double((a.getX() + b.getX()) / 2 + dx, (a.getY() + b.getY()) / 2 + dy); - } - - - private boolean isLeft(Point2D point) { - return ((b.getX() - a.getX()) * (point.getY() - a.getY()) - (b.getY() - a.getY()) * (point.getX() - a.getX())) > 0; - } - - public double getLength() { - return length; - } - - public void debugMe(UGraphic ug) { - final double dx = b.getX() - a.getX(); - final double dy = b.getY() - a.getY(); - ug = ug.apply(new UTranslate(a)); - ug.draw(new ULine(dx, dy)); - - } - -} diff --git a/src/net/sourceforge/plantuml/cute/Stick.java b/src/net/sourceforge/plantuml/cute/Stick.java deleted file mode 100644 index 0da331f89..000000000 --- a/src/net/sourceforge/plantuml/cute/Stick.java +++ /dev/null @@ -1,100 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2020, Arnaud Roques - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://plantuml.com/paypal - * - * This file is part of PlantUML. - * - * PlantUML is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.cute; - -import java.awt.geom.Point2D; - -import net.sourceforge.plantuml.ugraphic.UGraphic; -import net.sourceforge.plantuml.ugraphic.UPath; - -public class Stick implements CuteShape { - - private final double width; - private final double height; - private final RotationZoom rotationZoom; - - public Stick(VarArgs varArgs) { - final Point2D dim = varArgs.getAsPoint("dimension"); - this.width = dim.getX(); - this.height = dim.getY(); - this.rotationZoom = RotationZoom.none(); - } - - private Stick(double width, double height, RotationZoom rotation) { - this.width = width; - this.height = height; - this.rotationZoom = rotation; - } - - public void drawU(UGraphic ug) { - if (width > height) { - drawRotate1(ug); - } else { - drawRotate2(ug); - } - } - - private void drawRotate1(UGraphic ug) { - assert width > height; - final UPath path = new UPath(); - final double small = height / 2; - path.moveTo(rotationZoom.getPoint(small, 0)); - path.lineTo(rotationZoom.getPoint(width - small, 0)); - path.arcTo(rotationZoom.getPoint(width - small, height), small, 0, 1); - path.lineTo(rotationZoom.getPoint(small, height)); - path.arcTo(rotationZoom.getPoint(small, 0), small, 0, 1); - path.closePath(); - ug.draw(path); - } - - private void drawRotate2(UGraphic ug) { - assert height > width; - final UPath path = new UPath(); - final double small = width / 2; - path.moveTo(rotationZoom.getPoint(width, small)); - path.lineTo(rotationZoom.getPoint(width, height - small)); - path.arcTo(rotationZoom.getPoint(0, height - small), small, 0, 1); - path.lineTo(rotationZoom.getPoint(0, small)); - path.arcTo(rotationZoom.getPoint(width, small), small, 0, 1); - path.closePath(); - ug.draw(path); - } - - public Stick rotateZoom(RotationZoom other) { - return new Stick(width, height, this.rotationZoom.compose(other)); - } - -} diff --git a/src/net/sourceforge/plantuml/cute/Tension.java b/src/net/sourceforge/plantuml/cute/Tension.java deleted file mode 100644 index 41ad9da45..000000000 --- a/src/net/sourceforge/plantuml/cute/Tension.java +++ /dev/null @@ -1,62 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2020, Arnaud Roques - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://plantuml.com/paypal - * - * This file is part of PlantUML. - * - * PlantUML is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.cute; - -public class Tension { - - private final double tension; - - public Tension(double tension) { - this.tension = tension; - } - - public static Tension none() { - return new Tension(0); - } - - public Tension rotateZoom(RotationZoom rotationZoom) { - return new Tension(rotationZoom.applyZoom(tension)); - } - - public boolean isNone() { - return tension == 0; - } - - public double getValue() { - return tension; - } - -} diff --git a/src/net/sourceforge/plantuml/cute/Triangle.java b/src/net/sourceforge/plantuml/cute/Triangle.java deleted file mode 100644 index c25a95dee..000000000 --- a/src/net/sourceforge/plantuml/cute/Triangle.java +++ /dev/null @@ -1,62 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2020, Arnaud Roques - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://plantuml.com/paypal - * - * This file is part of PlantUML. - * - * PlantUML is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.cute; - -import net.sourceforge.plantuml.ugraphic.UGraphic; - -public class Triangle implements CuteShape { - - private final CutePath cutePath; - - public Triangle(VarArgs varArgs) { - this(varArgs.getPointList("points")); - } - - private Triangle(CutePath cutePath) { - this.cutePath = cutePath; - } - - public Triangle rotateZoom(final RotationZoom angle) { - if (angle.isNone()) { - return this; - } - return new Triangle(cutePath.rotateZoom(angle)); - } - - public void drawU(UGraphic ug) { - cutePath.drawU(ug); - } -} diff --git a/src/net/sourceforge/plantuml/cute/TriangleCorner.java b/src/net/sourceforge/plantuml/cute/TriangleCorner.java deleted file mode 100644 index 7e5441ccd..000000000 --- a/src/net/sourceforge/plantuml/cute/TriangleCorner.java +++ /dev/null @@ -1,143 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2020, Arnaud Roques - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://plantuml.com/paypal - * - * This file is part of PlantUML. - * - * PlantUML is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.cute; - -import java.awt.geom.Point2D; - -import net.sourceforge.plantuml.ugraphic.UTranslate; - -public class TriangleCorner { - - private final Point2D o; - private final Point2D a; - private final Point2D b; - private final TriangleCornerSimple simple; - private final UTranslate translateO; - private final UTranslate translateOreverse; - - private final RotationZoom rotation; - private final RotationZoom rotationInverse; - - @Override - public String toString() { - return "Corner " + o + " a=" + a + " b=" + b; - } - - public boolean hasCurvation() { - return ((MyPoint2D) o).hasCurvation(); - } - - public double getCurvation() { - if (hasCurvation() == false) { - throw new IllegalStateException(); - } - return ((MyPoint2D) o).getCurvation(0); - } - - public TriangleCorner(Point2D o, Point2D a, Point2D b) { - this.o = o; - this.a = a; - this.b = b; - this.translateO = new UTranslate(o); - this.translateOreverse = translateO.reverse(); - final Point2D a2 = translateOreverse.getTranslated(a); - final Point2D b2 = translateOreverse.getTranslated((b)); - - final Point2D a3, b3; - if (a2.getX() == 0) { - a3 = a2; - b3 = b2; - this.rotation = RotationZoom.none(); - this.rotationInverse = RotationZoom.none(); - } else { - this.rotation = RotationZoom.builtRotationOnYaxis(a2); - this.rotationInverse = rotation.inverse(); - a3 = rotation.getPoint(a2); - b3 = rotation.getPoint(b2); - } - - this.simple = new TriangleCornerSimple(a3, b3); - } - - public Point2D getOnSegmentA(double dist) { - final Segment seg = new Segment(o, a); - return seg.getFromAtoB(dist); - } - - public Point2D getOnSegmentB(double dist) { - final Segment seg = new Segment(o, b); - return seg.getFromAtoB(dist); - } - - public Balloon getCenterWithFixedRadius(double radius) { - final Point2D centerSimple = simple.getCenterWithFixedRadius(radius); - return new Balloon(rotationInverse.getPoint(translateO.getTranslated(centerSimple)), radius); - } - - private Balloon getBalloonWithFixedY(double y) { - Balloon result = simple.getBalloonWithFixedY(y); - result = result.rotate(rotationInverse); - result = result.translate(translateO); - return result; - } - - public Point2D getCornerOrBalloonCenter() { - if (hasCurvation()) { - return getBalloonInside().getCenter(); - } - return getO(); - } - - public double determinant() { - final double ux = a.getX() - o.getX(); - final double uy = a.getY() - o.getY(); - final double vx = b.getX() - o.getX(); - final double vy = b.getY() - o.getY(); - return ux * vy - uy * vx; - } - - public Point2D getO() { - return o; - } - - public Balloon getBalloonInside() { - if (hasCurvation() == false) { - throw new IllegalStateException(); - } - return getBalloonWithFixedY(getCurvation()); - } - -} diff --git a/src/net/sourceforge/plantuml/cute/TriangleCornerSimple.java b/src/net/sourceforge/plantuml/cute/TriangleCornerSimple.java deleted file mode 100644 index f0ac7cd90..000000000 --- a/src/net/sourceforge/plantuml/cute/TriangleCornerSimple.java +++ /dev/null @@ -1,117 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2020, Arnaud Roques - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://plantuml.com/paypal - * - * This file is part of PlantUML. - * - * PlantUML is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.cute; - -import java.awt.geom.Point2D; - -public class TriangleCornerSimple { - - private final Point2D a; - private final Point2D b; - - @Override - public String toString() { - return "TriangleCornerSimple a=" + a + " " + Math.toDegrees(getAngleA()) + " b=" + b + " " - + Math.toDegrees(getAngleB()); - } - - public TriangleCornerSimple(Point2D a, Point2D b) { - if (isZero(a.getX()) == false) { - throw new IllegalArgumentException("a=" + a); - } - this.a = a; - this.b = b; - } - - private static boolean isZero(double v) { - return Math.abs(v) < 0.0001; - } - - double getAngleA() { - return getAngle(a); - } - - double getAngleB() { - return getAngle(b); - } - - double getAngle(Point2D pt) { - final double dx = pt.getX(); - final double dy = pt.getY(); - return Math.atan2(dy, dx); - - } - - static double solveY(double alpha, double x) { - if (alpha < 0 || alpha > Math.PI / 2) { - throw new IllegalArgumentException(); - } - return x * Math.tan(alpha); - } - - static double solveX(double alpha, double y) { - if (alpha < -Math.PI / 2 || alpha > Math.PI / 2) { - // throw new IllegalArgumentException("y=" + y + " alpha=" + Math.toDegrees(alpha)); - } - final double beta = Math.PI / 2 - alpha; - // System.err.println("alpha1=" + Math.toDegrees(alpha)); - // System.err.println("beta11=" + Math.toDegrees(beta)); - // System.err.println("XX=" + y * Math.tan(beta)); - return y * Math.tan(beta); - - } - - public Point2D getCenterWithFixedRadius(double radius) { - final double alpha = (getAngleA() + getAngleB()) / 2; - final double y = solveY(alpha, radius); - return new Point2D.Double(radius, y); - } - - public Balloon getBalloonWithFixedY(double y) { - // System.err.println("TriangleCornerSimple::getCenterWithFixedY y=" + y); - // System.err.println("a=" + a + " " + Math.toDegrees(getAngleA())); - // System.err.println("b=" + b + " " + Math.toDegrees(getAngleB())); - final double alpha = (getAngleA() + getAngleB()) / 2; - // System.err.println("alpha=" + Math.toDegrees(alpha)); - final double sign = Math.signum(a.getY()); - // System.err.println("sgn=" + sign); - final double x = solveX(alpha, y); - final Balloon result = new Balloon(new Point2D.Double(x * sign, y * sign), Math.abs(x)); - // System.err.println("result=" + result); - return result; - } - -} diff --git a/src/net/sourceforge/plantuml/cute/VarArgs.java b/src/net/sourceforge/plantuml/cute/VarArgs.java deleted file mode 100644 index 55222f1c6..000000000 --- a/src/net/sourceforge/plantuml/cute/VarArgs.java +++ /dev/null @@ -1,132 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2020, Arnaud Roques - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://plantuml.com/paypal - * - * This file is part of PlantUML. - * - * PlantUML is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.cute; - -import java.awt.geom.Point2D; -import java.util.HashMap; -import java.util.Map; -import java.util.StringTokenizer; - -import net.sourceforge.plantuml.ugraphic.UTranslate; -import net.sourceforge.plantuml.ugraphic.color.HColor; -import net.sourceforge.plantuml.ugraphic.color.HColorSet; -import net.sourceforge.plantuml.ugraphic.color.HColorUtils; - -public class VarArgs { - - private final Map args = new HashMap(); - - public VarArgs(String data) { - for (String s : data.split("\\s")) { - if (s.contains("=")) { - final StringTokenizer st = new StringTokenizer(s, "="); - final String key = st.nextToken(); - final String value = st.nextToken(); - args.put(key, value); - } - } - // System.err.println("arg=" + args); - } - - @Override - public String toString() { - return args.toString(); - } - - public double getAsDouble(String k, double def) { - if (args.containsKey(k)) { - return getAsDouble(k); - } - return def; - } - - public double getAsDouble(String k) { - final String value = args.get(k); - if (value == null) { - throw new IllegalArgumentException("no key " + k); - } - return Double.parseDouble(value); - } - - public MyDouble getAsMyDouble(String k) { - final String value = args.get(k); - if (value == null) { - throw new IllegalArgumentException("no key " + k); - } - return new MyDouble(value); - } - - public HColor getAsColor(String k) { - final String value = args.get(k); - if (value == null) { - return HColorUtils.BLACK; - } - final HColor result = HColorSet.instance().getColorOrWhite(value); - if (result == null) { - return HColorUtils.BLACK; - } - return result; - } - - public Point2D getAsPoint(String k) { - final String value = args.get(k); - if (value == null) { - throw new IllegalArgumentException("no key " + k); - } - final StringTokenizer st = new StringTokenizer(value.replaceAll("[()]", ""), ","); - return new Point2D.Double(Double.parseDouble(st.nextToken()), Double.parseDouble(st.nextToken())); - } - - public Point2D getAsPoint(String k, Point2D def) { - if (args.containsKey(k)) { - return getAsPoint(k); - } - return def; - } - - public CutePath getPointList(String k) { - final String value = args.get(k); - if (value == null) { - throw new IllegalArgumentException("no key " + k); - } - return new CutePath(value); - } - - public UTranslate getPosition() { - return new UTranslate(getAsPoint("position", new Point2D.Double())); - } - -} diff --git a/src/net/sourceforge/plantuml/jungle/CommandAddLevel.java b/src/net/sourceforge/plantuml/jungle/CommandAddLevel.java deleted file mode 100644 index 6a2f640f1..000000000 --- a/src/net/sourceforge/plantuml/jungle/CommandAddLevel.java +++ /dev/null @@ -1,66 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2020, Arnaud Roques - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://plantuml.com/paypal - * - * This file is part of PlantUML. - * - * PlantUML is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.jungle; - -import net.sourceforge.plantuml.LineLocation; -import net.sourceforge.plantuml.command.CommandExecutionResult; -import net.sourceforge.plantuml.command.SingleLineCommand2; -import net.sourceforge.plantuml.command.regex.IRegex; -import net.sourceforge.plantuml.command.regex.RegexConcat; -import net.sourceforge.plantuml.command.regex.RegexLeaf; -import net.sourceforge.plantuml.command.regex.RegexResult; - -public class CommandAddLevel extends SingleLineCommand2 { - - public CommandAddLevel() { - super(getRegexConcat()); - } - - static IRegex getRegexConcat() { - return RegexConcat.build(CommandAddLevel.class.getName(), RegexLeaf.start(), // - new RegexLeaf("LEVEL", "(=+)"), // - RegexLeaf.spaceOneOrMore(), // - new RegexLeaf("LABEL", "(.+)"), RegexLeaf.end()); - } - - @Override - protected CommandExecutionResult executeArg(PSystemTree diagram, LineLocation location, RegexResult arg) { - final String level = arg.get("LEVEL", 0); - final String label = arg.get("LABEL", 0); - return diagram.addParagraph(level.length(), label); - } - -} diff --git a/src/net/sourceforge/plantuml/jungle/CommandEmpty.java b/src/net/sourceforge/plantuml/jungle/CommandEmpty.java deleted file mode 100644 index fcda3a8b6..000000000 --- a/src/net/sourceforge/plantuml/jungle/CommandEmpty.java +++ /dev/null @@ -1,62 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2020, Arnaud Roques - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://plantuml.com/paypal - * - * This file is part of PlantUML. - * - * PlantUML is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.jungle; - -import net.sourceforge.plantuml.LineLocation; -import net.sourceforge.plantuml.command.CommandExecutionResult; -import net.sourceforge.plantuml.command.SingleLineCommand2; -import net.sourceforge.plantuml.command.regex.IRegex; -import net.sourceforge.plantuml.command.regex.RegexConcat; -import net.sourceforge.plantuml.command.regex.RegexLeaf; -import net.sourceforge.plantuml.command.regex.RegexResult; - -public class CommandEmpty extends SingleLineCommand2 { - - public CommandEmpty() { - super(getRegexConcat()); - } - - static IRegex getRegexConcat() { - return RegexConcat.build(CommandEmpty.class.getName(), RegexLeaf.start(), // - RegexLeaf.spaceZeroOrMore(), RegexLeaf.end()); - } - - @Override - protected CommandExecutionResult executeArg(PSystemTree diagram, LineLocation location, RegexResult arg) { - return CommandExecutionResult.ok(); - } - -} diff --git a/src/net/sourceforge/plantuml/jungle/GNode.java b/src/net/sourceforge/plantuml/jungle/GNode.java deleted file mode 100644 index a3beed52c..000000000 --- a/src/net/sourceforge/plantuml/jungle/GNode.java +++ /dev/null @@ -1,67 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2020, Arnaud Roques - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://plantuml.com/paypal - * - * This file is part of PlantUML. - * - * PlantUML is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.jungle; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import net.sourceforge.plantuml.cucadiagram.Display; - -public class GNode { - - private final Display display; - private final List children = new ArrayList(); - - public GNode(Display display) { - this.display = display; - } - - public Display getDisplay() { - return display; - } - - public List getChildren() { - return Collections.unmodifiableList(children); - } - - public GNode addChild(Display display) { - final GNode child = new GNode(display); - children.add(child); - return child; - } - -} \ No newline at end of file diff --git a/src/net/sourceforge/plantuml/jungle/GNodeUtils.java b/src/net/sourceforge/plantuml/jungle/GNodeUtils.java deleted file mode 100644 index e83843f48..000000000 --- a/src/net/sourceforge/plantuml/jungle/GNodeUtils.java +++ /dev/null @@ -1,56 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2020, Arnaud Roques - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://plantuml.com/paypal - * - * This file is part of PlantUML. - * - * PlantUML is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.jungle; - -public class GNodeUtils { - -// public static GNode getIndirectChild(GNode root, String id) { -// if (root.getId().equals(id)) { -// return root; -// } -// for (GNode n : root.getChildren()) { -// if (n.getId().equals(id)) { -// return n; -// } -// final GNode result = getIndirectChild(n, id); -// if (result != null) { -// return result; -// } -// } -// return null; -// } - -} \ No newline at end of file diff --git a/src/net/sourceforge/plantuml/jungle/GTile.java b/src/net/sourceforge/plantuml/jungle/GTile.java deleted file mode 100644 index 3b781cbd8..000000000 --- a/src/net/sourceforge/plantuml/jungle/GTile.java +++ /dev/null @@ -1,44 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2020, Arnaud Roques - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://plantuml.com/paypal - * - * This file is part of PlantUML. - * - * PlantUML is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.jungle; - -import net.sourceforge.plantuml.graphic.StringBounder; -import net.sourceforge.plantuml.graphic.TextBlock; - -public interface GTile extends TextBlock { - - public GTileGeometry calculateDimension(StringBounder stringBounder); -} diff --git a/src/net/sourceforge/plantuml/jungle/GTileGeometry.java b/src/net/sourceforge/plantuml/jungle/GTileGeometry.java deleted file mode 100644 index e3005770e..000000000 --- a/src/net/sourceforge/plantuml/jungle/GTileGeometry.java +++ /dev/null @@ -1,76 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2020, Arnaud Roques - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://plantuml.com/paypal - * - * This file is part of PlantUML. - * - * PlantUML is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.jungle; - -import java.awt.geom.Dimension2D; -import java.util.Collections; -import java.util.List; - -public class GTileGeometry extends Dimension2D { - - private final double width; - private final double height; - private final List westPositions; - - public GTileGeometry(Dimension2D dim, List westPositions) { - this(dim.getWidth(), dim.getHeight(), westPositions); - } - - @Override - public void setSize(double width, double height) { - throw new UnsupportedOperationException(); - } - - public GTileGeometry(double width, double height, List westPositions) { - this.width = width; - this.height = height; - this.westPositions = westPositions; - } - - @Override - public final double getWidth() { - return width; - } - - @Override - public final double getHeight() { - return height; - } - - public List getWestPositions() { - return Collections.unmodifiableList(westPositions); - } -} diff --git a/src/net/sourceforge/plantuml/jungle/GTileLeftRight.java b/src/net/sourceforge/plantuml/jungle/GTileLeftRight.java deleted file mode 100644 index e899c63c2..000000000 --- a/src/net/sourceforge/plantuml/jungle/GTileLeftRight.java +++ /dev/null @@ -1,103 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2020, Arnaud Roques - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://plantuml.com/paypal - * - * This file is part of PlantUML. - * - * PlantUML is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.jungle; - -import java.awt.geom.Dimension2D; -import java.util.Arrays; - -import net.sourceforge.plantuml.Dimension2DDouble; -import net.sourceforge.plantuml.graphic.AbstractTextBlock; -import net.sourceforge.plantuml.graphic.StringBounder; -import net.sourceforge.plantuml.ugraphic.UGraphic; -import net.sourceforge.plantuml.ugraphic.UPath; -import net.sourceforge.plantuml.ugraphic.UTranslate; -import net.sourceforge.plantuml.ugraphic.color.HColorUtils; - -public class GTileLeftRight extends AbstractTextBlock implements GTile { - - private final GTile left; - private final GTile right; - private final double space; - private final double step = 5; - - public GTileLeftRight(GTile left, GTile right, double space) { - this.left = left; - this.right = right; - this.space = space; - } - - public void drawU(UGraphic ug) { - final StringBounder stringBounder = ug.getStringBounder(); - final GTileGeometry dimLeft = left.calculateDimension(stringBounder); - final GTileGeometry dimRight = right.calculateDimension(stringBounder); - final Dimension2D dimTotal = calculateDimension(stringBounder); - final double deltaH1 = dimTotal.getHeight() - dimLeft.getHeight(); - final double deltaH2 = dimTotal.getHeight() - dimRight.getHeight(); - left.drawU(ug.apply(UTranslate.dy(deltaH1 / 2))); - final double dx2 = dimLeft.getWidth() + space; - right.drawU(ug.apply(new UTranslate(dx2, deltaH2 / 2))); - - ug = ug.apply(HColorUtils.BLACK); - final double step = dimLeft.getHeight() / (dimRight.getWestPositions().size() + 1); - double ystart = step + deltaH1 / 2; - for (Double w2 : dimRight.getWestPositions()) { - line(ug, dimLeft.getWidth(), ystart, dx2, w2 + deltaH2 / 2); - ystart += step; - } - - } - - private void line(UGraphic ug, double x1, double y1, double x2, double y2) { - // final ULine line = new ULine(x2 - x1, y2 - y1); - // ug.apply(new UTranslate(x1, y1)).draw(line); - final UPath path = new UPath(); - path.moveTo(x1, y1); - path.lineTo(x1 + step, y1); - path.lineTo(x2 - step, y2); - path.lineTo(x2, y2); - ug.apply(UTranslate.dy(0)).draw(path); - } - - public GTileGeometry calculateDimension(StringBounder stringBounder) { - final GTileGeometry dimLeft = left.calculateDimension(stringBounder); - final Dimension2D dimRight = right.calculateDimension(stringBounder); - final Dimension2D dimTotal = new Dimension2DDouble(dimLeft.getWidth() + space + dimRight.getHeight(), Math.max( - dimLeft.getHeight(), dimRight.getHeight())); - final double deltaH1 = dimTotal.getHeight() - dimLeft.getHeight(); - final double west = dimLeft.getWestPositions().get(0) + deltaH1 / 2; - return new GTileGeometry(dimTotal, Arrays.asList(west)); - } -} diff --git a/src/net/sourceforge/plantuml/jungle/GTileNode.java b/src/net/sourceforge/plantuml/jungle/GTileNode.java deleted file mode 100644 index d706525b6..000000000 --- a/src/net/sourceforge/plantuml/jungle/GTileNode.java +++ /dev/null @@ -1,99 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2020, Arnaud Roques - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://plantuml.com/paypal - * - * This file is part of PlantUML. - * - * PlantUML is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.jungle; - -import java.awt.geom.Dimension2D; -import java.util.Arrays; - -import net.sourceforge.plantuml.FontParam; -import net.sourceforge.plantuml.LineBreakStrategy; -import net.sourceforge.plantuml.SkinParam; -import net.sourceforge.plantuml.creole.CreoleMode; -import net.sourceforge.plantuml.creole.Parser; -import net.sourceforge.plantuml.creole.Sheet; -import net.sourceforge.plantuml.creole.SheetBlock1; -import net.sourceforge.plantuml.cucadiagram.Display; -import net.sourceforge.plantuml.graphic.AbstractTextBlock; -import net.sourceforge.plantuml.graphic.FontConfiguration; -import net.sourceforge.plantuml.graphic.HorizontalAlignment; -import net.sourceforge.plantuml.graphic.StringBounder; -import net.sourceforge.plantuml.graphic.SymbolContext; -import net.sourceforge.plantuml.graphic.TextBlock; -import net.sourceforge.plantuml.graphic.TextBlockUtils; -import net.sourceforge.plantuml.graphic.USymbol; -import net.sourceforge.plantuml.skin.rose.Rose; -import net.sourceforge.plantuml.ugraphic.UFont; -import net.sourceforge.plantuml.ugraphic.UGraphic; -import net.sourceforge.plantuml.ugraphic.color.HColor; -import net.sourceforge.plantuml.ugraphic.color.HColorUtils; - -public class GTileNode extends AbstractTextBlock implements GTile { - - private final TextBlock tb; - - public GTileNode(GNode node) { - final Display display = node.getDisplay(); - final SheetBlock1 sheetBlock1 = getTextBlock(display); - - final SymbolContext symbolContext = new SymbolContext(HColorUtils.MY_YELLOW, HColorUtils.BLACK); - tb = USymbol.RECTANGLE.asSmall(null, sheetBlock1, TextBlockUtils.empty(0, 0), symbolContext, - HorizontalAlignment.CENTER); - } - - public static SheetBlock1 getTextBlock(final Display display) { - final Rose rose = new Rose(); - final SkinParam skinParam = SkinParam.create(null); - final HColor fontColor = rose.getFontColor(skinParam, FontParam.NOTE); - final UFont fontNote = skinParam.getFont(null, false, FontParam.NOTE); - - final FontConfiguration fc = new FontConfiguration(skinParam, FontParam.NOTE, null); - - final Sheet sheet9 = Parser.build(fc, HorizontalAlignment.LEFT, skinParam, CreoleMode.FULL) - .createSheet(display); - final SheetBlock1 sheetBlock1 = new SheetBlock1(sheet9, LineBreakStrategy.NONE, 0); - return sheetBlock1; - } - - public void drawU(UGraphic ug) { - tb.drawU(ug); - } - - public GTileGeometry calculateDimension(StringBounder stringBounder) { - final Dimension2D dim = tb.calculateDimension(stringBounder); - return new GTileGeometry(dim, Arrays.asList(dim.getHeight() / 2)); - } - -} diff --git a/src/net/sourceforge/plantuml/jungle/GTileOneLevelFactory.java b/src/net/sourceforge/plantuml/jungle/GTileOneLevelFactory.java deleted file mode 100644 index 34d164c16..000000000 --- a/src/net/sourceforge/plantuml/jungle/GTileOneLevelFactory.java +++ /dev/null @@ -1,57 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2020, Arnaud Roques - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://plantuml.com/paypal - * - * This file is part of PlantUML. - * - * PlantUML is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.jungle; - -import java.util.ArrayList; -import java.util.List; - -public class GTileOneLevelFactory { - - public GTile createGTile(GNode root) { - final GTileNode left = new GTileNode(root); - if (root.getChildren().size() == 0) { - return left; - } - final List all = new ArrayList(); - for (GNode n : root.getChildren()) { - all.add(createGTile(n)); - } - final GTileStack right = new GTileStack(all, 20); - return new GTileLeftRight(left, right, 30); - - } - -} diff --git a/src/net/sourceforge/plantuml/jungle/GTileStack.java b/src/net/sourceforge/plantuml/jungle/GTileStack.java deleted file mode 100644 index 3528cf53a..000000000 --- a/src/net/sourceforge/plantuml/jungle/GTileStack.java +++ /dev/null @@ -1,84 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2020, Arnaud Roques - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://plantuml.com/paypal - * - * This file is part of PlantUML. - * - * PlantUML is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.jungle; - -import java.awt.geom.Dimension2D; -import java.util.ArrayList; -import java.util.List; - -import net.sourceforge.plantuml.graphic.AbstractTextBlock; -import net.sourceforge.plantuml.graphic.StringBounder; -import net.sourceforge.plantuml.ugraphic.UGraphic; -import net.sourceforge.plantuml.ugraphic.UTranslate; - -public class GTileStack extends AbstractTextBlock implements GTile { - - private final List tiles; - private final double space; - - public GTileStack(List tiles, double space) { - this.tiles = tiles; - this.space = space; - if (tiles.size() == 0) { - throw new IllegalArgumentException(); - } - } - - public void drawU(UGraphic ug) { - for (GTile tile : tiles) { - tile.drawU(ug); - final Dimension2D dim = tile.calculateDimension(ug.getStringBounder()); - ug = ug.apply(UTranslate.dy(dim.getHeight() + space)); - } - } - - public GTileGeometry calculateDimension(StringBounder stringBounder) { - double width = 0; - double height = 0; - double delta = 0; - final List wests = new ArrayList(); - for (GTile tile : tiles) { - final GTileGeometry dim = tile.calculateDimension(stringBounder); - wests.add(delta + dim.getWestPositions().get(0)); - height += dim.getHeight(); - delta += dim.getHeight() + space; - width = Math.max(width, dim.getWidth()); - } - height += (tiles.size() - 1) * space; - return new GTileGeometry(width, height, wests); - } - -} diff --git a/src/net/sourceforge/plantuml/jungle/Needle.java b/src/net/sourceforge/plantuml/jungle/Needle.java deleted file mode 100644 index 7ed85372b..000000000 --- a/src/net/sourceforge/plantuml/jungle/Needle.java +++ /dev/null @@ -1,114 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2020, Arnaud Roques - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://plantuml.com/paypal - * - * This file is part of PlantUML. - * - * PlantUML is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.jungle; - -import java.util.List; - -import net.sourceforge.plantuml.cucadiagram.Display; -import net.sourceforge.plantuml.graphic.UDrawable; -import net.sourceforge.plantuml.ugraphic.UGraphic; -import net.sourceforge.plantuml.ugraphic.ULine; -import net.sourceforge.plantuml.ugraphic.UTranslate; -import net.sourceforge.plantuml.ugraphic.color.HColorUtils; - -public class Needle implements UDrawable { - - private final double length; - private final Display display; - private final double degreePosition; - private final double degreeOperture; - - private Needle(Display display, double length, double degreePosition, double degreeOperture) { - this.display = display; - this.degreePosition = degreePosition; - this.degreeOperture = degreeOperture; - this.length = length; - } - - public void drawU(UGraphic ug) { - GTileNode.getTextBlock(display); - ug.draw(getLine()); - - ug = ug.apply(getTranslate(length)); - GTileNode.getTextBlock(display).drawU(ug); - } - - private ULine getLine() { - final UTranslate translate = getTranslate(length); - return new ULine(translate.getDx(), translate.getDy()); - } - - public UTranslate getTranslate(double dist) { - final double angle = degreePosition * Math.PI / 180.0; - final double dx = dist * Math.cos(angle); - final double dy = dist * Math.sin(angle); - return new UTranslate(dx, dy); - } - - public UDrawable addChildren(final List children) { - return new UDrawable() { - public void drawU(UGraphic ug) { - Needle.this.drawU(ug); - if (children.size() == 0) { - return; - } - ug = ug.apply(getTranslate(length / 2)); - final UDrawable child1 = getNeedle(children.get(0), length / 2, degreePosition + degreeOperture, - degreeOperture / 2); - child1.drawU(ug); - if (children.size() == 1) { - return; - } - final UDrawable child2 = getNeedle(children.get(1), length / 2, degreePosition - degreeOperture, - degreeOperture / 2); - child2.drawU(ug); - - } - }; - } - - public static UDrawable getNeedle(GNode root, double length, double degree, double degreeOperture) { - final Needle needle0 = new Needle(root.getDisplay(), length, degree, degreeOperture); - final UDrawable n1 = needle0.addChildren(root.getChildren()); - return new UDrawable() { - public void drawU(UGraphic ug) { - ug = ug.apply(HColorUtils.BLACK); - n1.drawU(ug); - } - }; - } - -} \ No newline at end of file diff --git a/src/net/sourceforge/plantuml/jungle/PSystemTree.java b/src/net/sourceforge/plantuml/jungle/PSystemTree.java deleted file mode 100644 index 97f233c29..000000000 --- a/src/net/sourceforge/plantuml/jungle/PSystemTree.java +++ /dev/null @@ -1,127 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2020, Arnaud Roques - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://plantuml.com/paypal - * - * This file is part of PlantUML. - * - * PlantUML is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - */ -package net.sourceforge.plantuml.jungle; - -import java.io.IOException; -import java.io.OutputStream; -import java.util.ArrayList; -import java.util.List; - -import net.sourceforge.plantuml.AbstractPSystem; -import net.sourceforge.plantuml.FileFormatOption; -import net.sourceforge.plantuml.SkinParam; -import net.sourceforge.plantuml.SvgCharSizeHack; -import net.sourceforge.plantuml.UseStyle; -import net.sourceforge.plantuml.command.CommandExecutionResult; -import net.sourceforge.plantuml.core.DiagramDescription; -import net.sourceforge.plantuml.core.ImageData; -import net.sourceforge.plantuml.cucadiagram.Display; -import net.sourceforge.plantuml.graphic.UDrawable; -import net.sourceforge.plantuml.graphic.UDrawableUtils; -import net.sourceforge.plantuml.style.ClockwiseTopRightBottomLeft; -import net.sourceforge.plantuml.ugraphic.ImageBuilder; -import net.sourceforge.plantuml.ugraphic.ImageParameter; -import net.sourceforge.plantuml.ugraphic.LimitFinder; -import net.sourceforge.plantuml.ugraphic.color.ColorMapperIdentity; -import net.sourceforge.plantuml.ugraphic.color.HColor; -import net.sourceforge.plantuml.ugraphic.color.HColorUtils; - -public class PSystemTree extends AbstractPSystem { - - private GNode root; - private List stack = new ArrayList(); - private final Rendering rendering = Rendering.NEEDLE; - - public DiagramDescription getDescription() { - return new DiagramDescription("(Tree)"); - } - - @Override - final protected ImageData exportDiagramNow(OutputStream os, int num, FileFormatOption fileFormat, long seed) - throws IOException { - final int margin1; - final int margin2; - if (UseStyle.useBetaStyle()) { - margin1 = SkinParam.zeroMargin(5); - margin2 = SkinParam.zeroMargin(5); - } else { - margin1 = 5; - margin2 = 5; - } - HColor backcolor = HColorUtils.WHITE; - - final ClockwiseTopRightBottomLeft margins = ClockwiseTopRightBottomLeft.margin1margin2(margin1, margin2); - final ImageParameter imageParameter = new ImageParameter(new ColorMapperIdentity(), false, null, null, - null, margins, backcolor); - final ImageBuilder builder = ImageBuilder.build(imageParameter); - - if (rendering == Rendering.NEEDLE) { - final UDrawable tmp = Needle.getNeedle(root, 200, 0, 60); - final LimitFinder limitFinder = new LimitFinder(fileFormat.getDefaultStringBounder(SvgCharSizeHack.NO_HACK), - true); - tmp.drawU(limitFinder); - final double minY = limitFinder.getMinY(); - builder.setUDrawable(UDrawableUtils.move(tmp, 0, -minY)); - } else { - builder.setUDrawable(new GTileOneLevelFactory().createGTile(root)); - } - return builder.writeImageTOBEMOVED(fileFormat, seed, os); - } - - public CommandExecutionResult addParagraph(int level, String label) { - - if (level == 1 && root == null) { - root = new GNode(Display.create(label)); - stack.add(root); - return CommandExecutionResult.ok(); - } else if (level == 1 && root != null) { - return CommandExecutionResult.error("Not allowed 1"); - } - - final GNode parent = stack.get(level - 2); - final GNode newNode = parent.addChild(Display.create(label)); - - if (level > stack.size() + 1) { - return CommandExecutionResult.error("Not allowed 2"); - } else if (level - 1 == stack.size()) { - stack.add(newNode); - } else { - stack.set(level - 1, newNode); - } - - return CommandExecutionResult.ok(); - } - -} diff --git a/src/net/sourceforge/plantuml/jungle/PSystemTreeFactory.java b/src/net/sourceforge/plantuml/jungle/PSystemTreeFactory.java deleted file mode 100644 index 8cb3e7653..000000000 --- a/src/net/sourceforge/plantuml/jungle/PSystemTreeFactory.java +++ /dev/null @@ -1,63 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2020, Arnaud Roques - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://plantuml.com/paypal - * - * This file is part of PlantUML. - * - * PlantUML is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - */ -package net.sourceforge.plantuml.jungle; - -import java.util.ArrayList; -import java.util.List; - -import net.sourceforge.plantuml.command.Command; -import net.sourceforge.plantuml.command.PSystemCommandFactory; -import net.sourceforge.plantuml.core.DiagramType; - -public class PSystemTreeFactory extends PSystemCommandFactory { - - public PSystemTreeFactory(DiagramType type) { - super(type); - } - - @Override - protected List createCommands() { - final List cmds = new ArrayList(); - cmds.add(new CommandEmpty()); - cmds.add(new CommandAddLevel()); - return cmds; - } - - @Override - public PSystemTree createEmptyDiagram() { - return new PSystemTree(); - } - -} diff --git a/src/net/sourceforge/plantuml/jungle/Rendering.java b/src/net/sourceforge/plantuml/jungle/Rendering.java deleted file mode 100644 index 7b12a2a5b..000000000 --- a/src/net/sourceforge/plantuml/jungle/Rendering.java +++ /dev/null @@ -1,42 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2020, Arnaud Roques - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://plantuml.com/paypal - * - * This file is part of PlantUML. - * - * PlantUML is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Arnaud Roques - * - * - */ -package net.sourceforge.plantuml.jungle; - -public enum Rendering { - - BASIC, NEEDLE - -} \ No newline at end of file diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageEmptyPackage.java b/src/net/sourceforge/plantuml/svek/image/EntityImageEmptyPackage.java index 270cc6ff5..29e362227 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageEmptyPackage.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageEmptyPackage.java @@ -45,6 +45,7 @@ import net.sourceforge.plantuml.Guillemet; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.SkinParamUtils; import net.sourceforge.plantuml.Url; +import net.sourceforge.plantuml.UseStyle; import net.sourceforge.plantuml.activitydiagram3.ftile.EntityImageLegend; import net.sourceforge.plantuml.cucadiagram.Display; import net.sourceforge.plantuml.cucadiagram.DisplayPositionned; @@ -59,7 +60,10 @@ import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.TextBlockUtils; import net.sourceforge.plantuml.graphic.color.ColorType; +import net.sourceforge.plantuml.style.PName; import net.sourceforge.plantuml.style.SName; +import net.sourceforge.plantuml.style.Style; +import net.sourceforge.plantuml.style.StyleSignature; import net.sourceforge.plantuml.svek.AbstractEntityImage; import net.sourceforge.plantuml.svek.Cluster; import net.sourceforge.plantuml.svek.ClusterDecoration; @@ -73,23 +77,54 @@ public class EntityImageEmptyPackage extends AbstractEntityImage { private final TextBlock desc; private final static int MARGIN = 10; - private final HColor specificBackColor; - private final ISkinParam skinParam; + private final Stereotype stereotype; private final TextBlock stereoBlock; private final Url url; private final SName styleName; + private final double shadowing; + private final HColor borderColor; + private final UStroke stroke; + private final double roundCorner; + private final HColor back; + + private Style getStyle() { + return getDefaultStyleDefinition().getMergedStyle(getSkinParam().getCurrentStyleBuilder()); + } + + private StyleSignature getDefaultStyleDefinition() { + return StyleSignature.of(SName.root, SName.element, styleName, SName.package_); + } public EntityImageEmptyPackage(ILeaf entity, ISkinParam skinParam, PortionShower portionShower, SName styleName) { super(entity, skinParam); this.styleName = styleName; - this.skinParam = skinParam; - this.specificBackColor = entity.getColors(skinParam).getColor(ColorType.BACK); + + final HColor specificBackColor = entity.getColors(skinParam).getColor(ColorType.BACK); this.stereotype = entity.getStereotype(); this.desc = entity.getDisplay().create(new FontConfiguration(getSkinParam(), FontParam.PACKAGE, stereotype), HorizontalAlignment.CENTER, skinParam); this.url = entity.getUrl99(); + if (UseStyle.useBetaStyle()) { + final Style style = getStyle(); + this.borderColor = style.value(PName.LineColor).asColor(getSkinParam().getIHtmlColorSet()); + this.shadowing = style.value(PName.Shadowing).asDouble(); + this.stroke = style.getStroke(); + this.roundCorner = style.value(PName.RoundCorner).asDouble(); + if (specificBackColor == null) { + this.back = style.value(PName.BackGroundColor).asColor(getSkinParam().getIHtmlColorSet()); + } else { + this.back = specificBackColor; + } + } else { + this.borderColor = SkinParamUtils.getColor(getSkinParam(), getStereo(), ColorParam.packageBorder); + this.shadowing = getSkinParam().shadowing(getEntity().getStereotype()) ? 3 : 0; + this.stroke = GeneralImageBuilder.getForcedStroke(getEntity().getStereotype(), getSkinParam()); + this.roundCorner = 0; + this.back = Cluster.getBackColor(specificBackColor, skinParam, stereotype, styleName); + } + final DisplayPositionned legend = ((EntityImpl) entity).getLegend(); if (legend != null) { final TextBlock legendBlock = EntityImageLegend.create(legend.getDisplay(), skinParam); @@ -127,18 +162,14 @@ public class EntityImageEmptyPackage extends AbstractEntityImage { final double widthTotal = dimTotal.getWidth(); final double heightTotal = dimTotal.getHeight(); - final HColor back = Cluster.getBackColor(specificBackColor, skinParam, stereotype, styleName); - final double roundCorner = 0; - - final UStroke stroke = GeneralImageBuilder.getForcedStroke(getEntity().getStereotype(), getSkinParam()); final ClusterDecoration decoration = new ClusterDecoration(getSkinParam().packageStyle(), null, desc, stereoBlock, 0, 0, widthTotal, heightTotal, stroke); - final double shadowing = getSkinParam().shadowing(getEntity().getStereotype()) ? 3 : 0; - decoration.drawU(ug, back, SkinParamUtils.getColor(getSkinParam(), getStereo(), ColorParam.packageBorder), - shadowing, roundCorner, - getSkinParam().getHorizontalAlignment(AlignmentParam.packageTitleAlignment, null, false), - getSkinParam().getStereotypeAlignment()); + final HorizontalAlignment horizontalAlignment = getSkinParam() + .getHorizontalAlignment(AlignmentParam.packageTitleAlignment, null, false); + final HorizontalAlignment stereotypeAlignment = getSkinParam().getStereotypeAlignment(); + + decoration.drawU(ug, back, borderColor, shadowing, roundCorner, horizontalAlignment, stereotypeAlignment); if (url != null) { ug.closeUrl(); diff --git a/src/net/sourceforge/plantuml/timingdiagram/TimeConstraint.java b/src/net/sourceforge/plantuml/timingdiagram/TimeConstraint.java index 8100e86ad..2729d4615 100644 --- a/src/net/sourceforge/plantuml/timingdiagram/TimeConstraint.java +++ b/src/net/sourceforge/plantuml/timingdiagram/TimeConstraint.java @@ -60,6 +60,9 @@ public class TimeConstraint { private final ISkinParam skinParam; public TimeConstraint(TimeTick tick1, TimeTick tick2, String label, ISkinParam skinParam) { + if (tick1 == null || tick2 == null) { + throw new IllegalArgumentException(); + } this.tick1 = tick1; this.tick2 = tick2; this.label = Display.getWithNewlines(label); diff --git a/src/net/sourceforge/plantuml/timingdiagram/command/CommandConstraint.java b/src/net/sourceforge/plantuml/timingdiagram/command/CommandConstraint.java index 264aba858..4edf7328d 100644 --- a/src/net/sourceforge/plantuml/timingdiagram/command/CommandConstraint.java +++ b/src/net/sourceforge/plantuml/timingdiagram/command/CommandConstraint.java @@ -89,8 +89,14 @@ public class CommandConstraint extends SingleLineCommand2 { } } final TimeTick tick1 = TimeTickBuilder.parseTimeTick("TIME1", arg, diagram); + if (tick1 == null) { + return CommandExecutionResult.error("Unknown time label"); + } diagram.updateNow(tick1); final TimeTick tick2 = TimeTickBuilder.parseTimeTick("TIME2", arg, diagram); + if (tick2 == null) { + return CommandExecutionResult.error("Unknown time label"); + } player1.createConstraint(tick1, tick2, arg.get("MESSAGE", 0)); return CommandExecutionResult.ok(); } diff --git a/src/net/sourceforge/plantuml/ugraphic/ImageBuilder.java b/src/net/sourceforge/plantuml/ugraphic/ImageBuilder.java index edcca6ba6..658bc5fc9 100644 --- a/src/net/sourceforge/plantuml/ugraphic/ImageBuilder.java +++ b/src/net/sourceforge/plantuml/ugraphic/ImageBuilder.java @@ -57,7 +57,6 @@ import net.sourceforge.plantuml.EmptyImageBuilder; import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.FileFormatOption; import net.sourceforge.plantuml.FileUtils; -import net.sourceforge.plantuml.OptionFlags; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.anim.AffineTransformation; import net.sourceforge.plantuml.anim.Animation; @@ -78,7 +77,6 @@ import net.sourceforge.plantuml.ugraphic.color.HColorBackground; import net.sourceforge.plantuml.ugraphic.color.HColorGradient; import net.sourceforge.plantuml.ugraphic.color.HColorSimple; import net.sourceforge.plantuml.ugraphic.color.HColorUtils; -import net.sourceforge.plantuml.ugraphic.crossing.UGraphicCrossing; import net.sourceforge.plantuml.ugraphic.debug.UGraphicDebug; import net.sourceforge.plantuml.ugraphic.eps.UGraphicEps; import net.sourceforge.plantuml.ugraphic.g2d.UGraphicG2d; @@ -203,11 +201,11 @@ public class ImageBuilder { if (param.isUseHandwritten()) { return new UGraphicHandwritten(ug); } - if (OptionFlags.OMEGA_CROSSING) { - return new UGraphicCrossing(ug); - } else { - return ug; - } +// if (OptionFlags.OMEGA_CROSSING) { +// return new UGraphicCrossing(ug); +// } else { + return ug; +// } } private ImageData writeImageMjpeg(OutputStream os, StringBounder stringBounder) throws IOException { diff --git a/src/net/sourceforge/plantuml/ugraphic/crossing/UGraphicCrossing.java b/src/net/sourceforge/plantuml/ugraphic/crossing/UGraphicCrossing.java deleted file mode 100644 index d466331e6..000000000 --- a/src/net/sourceforge/plantuml/ugraphic/crossing/UGraphicCrossing.java +++ /dev/null @@ -1,163 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * (C) Copyright 2009-2020, Arnaud Roques - * - * Project Info: http://plantuml.com - * - * If you like this project or if you find it useful, you can support us at: - * - * http://plantuml.com/patreon (only 1$ per month!) - * http://plantuml.com/paypal - * - * This file is part of PlantUML. - * - * PlantUML is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * PlantUML distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA. - * - * - * Original Author: Adrian Vogt - * - */ -package net.sourceforge.plantuml.ugraphic.crossing; - -import java.awt.geom.Point2D; -import java.util.ArrayList; -import java.util.List; - -import net.sourceforge.plantuml.cute.Balloon; -import net.sourceforge.plantuml.cute.CrossingSegment; -import net.sourceforge.plantuml.geom.LineSegmentDouble; -import net.sourceforge.plantuml.graphic.UGraphicDelegator; -import net.sourceforge.plantuml.posimo.DotPath; -import net.sourceforge.plantuml.ugraphic.UChange; -import net.sourceforge.plantuml.ugraphic.UGraphic; -import net.sourceforge.plantuml.ugraphic.UShape; -import net.sourceforge.plantuml.ugraphic.UTranslate; -import net.sourceforge.plantuml.ugraphic.color.HColor; -import net.sourceforge.plantuml.ugraphic.color.HColorUtils; - -public class UGraphicCrossing extends UGraphicDelegator implements UGraphic { - - private final List lines; - private final UTranslate translate; - - static class Pending { - final UGraphic ug; - final LineSegmentDouble segment; - final UTranslate translate; - - Pending(UGraphic ug, UTranslate translate, LineSegmentDouble segment) { - this.ug = ug; - this.segment = segment; - this.translate = translate; - } - - void drawNow(HColor color) { - if (color == null) { - segment.draw(ug); - } else { - segment.draw(ug.apply(color)); - } - } - - List getCollisionsWith(List others) { - final List result = new ArrayList(); - for (Pending other : others) { - if (isClose(segment.getP1(), other.segment.getP1()) || isClose(segment.getP1(), other.segment.getP2()) - || isClose(segment.getP2(), other.segment.getP1()) - || isClose(segment.getP2(), other.segment.getP2())) { - continue; - } - final Point2D inter = segment.getSegIntersection(other.segment); - if (inter != null) { - result.add(inter); - } - } - return result; - } - } - - public UGraphicCrossing(UGraphic ug) { - this(ug, new UTranslate(), new ArrayList()); - } - - private static boolean isClose(Point2D p1, Point2D p2) { - return p1.distance(p2) < 0.1; - } - - private UGraphicCrossing(UGraphic ug, UTranslate translate, List lines) { - super(ug); - this.translate = translate; - this.lines = lines; - } - - public void draw(UShape shape) { - if (shape instanceof DotPath) { - drawDotPath((DotPath) shape); - } else { - getUg().draw(shape); - } - } - - private void drawDotPath(DotPath dotPath) { - if (dotPath.isLine()) { - for (LineSegmentDouble seg : dotPath.getLineSegments()) { - lines.add(new Pending(getUg().apply(translate.reverse()), translate, seg.translate(translate))); - } - } else { - getUg().draw(dotPath); - } - } - - public UGraphic apply(UChange change) { - if (change instanceof UTranslate) { - return new UGraphicCrossing(getUg().apply(change), translate.compose((UTranslate) change), lines); - } else { - return new UGraphicCrossing(getUg().apply(change), translate, lines); - } - } - - public void flushUg() { - final List pendings = new ArrayList(); - final List balloons = new ArrayList(); - for (Pending p : lines) { - final List tmp = p.getCollisionsWith(lines); - for (Point2D pt : tmp) { - balloons.add(new Balloon(pt, 5)); - } - // if (tmp.size() == 0) { - // p.drawNow(null); - // } else { - // pendings.add(p); - // } - } - for (Balloon b : balloons) { - b.drawU(getUg().apply(HColorUtils.GREEN.bg()).apply(HColorUtils.GREEN)); - } - for (Pending p : lines) { - for (Balloon b : balloons) { - List pts = new CrossingSegment(b, p.segment).intersection(); - for (Point2D pt : pts) { - final Balloon s2 = new Balloon(pt, 2); - s2.drawU(getUg().apply(HColorUtils.BLUE.bg()).apply(HColorUtils.BLUE)); - } - } - } - getUg().flushUg(); - } - -} diff --git a/src/net/sourceforge/plantuml/version/Version.java b/src/net/sourceforge/plantuml/version/Version.java index 38320775f..178f98cbb 100644 --- a/src/net/sourceforge/plantuml/version/Version.java +++ b/src/net/sourceforge/plantuml/version/Version.java @@ -44,7 +44,7 @@ public class Version { private static final int MAJOR_SEPARATOR = 1000000; public static int version() { - return 1202102; + return 1202103; } public static int versionPatched() { @@ -80,7 +80,7 @@ public class Version { } public static int beta() { - final int beta = 7; + final int beta = 0; return beta; } @@ -93,7 +93,7 @@ public class Version { } public static long compileTime() { - return 1615115427842L; + return 1616431999785L; } public static String compileTimeString() { diff --git a/stdlib/archimate-abx.repx b/stdlib/archimate-abx.repx index 1d7dd96c26822897b4b54c41f26fa88c62d40fc3..c09ca9c6c8f8a2a10d8e59f95189ed85d28a298d 100644 GIT binary patch literal 2528 zcmV<62_NVJ}{ ze!PZVy1z^(Pgv{|5)1d{cKFlNGi>XU+@$-=pETRHN)Q_95EkcQ8?zd)orUGTs0o@i zgd&y;uzz2`7tcLxFQB}-;^@vy@8gFis5@JD9e12It&ZAwP=nj5U^vNm^^oN2O@Tb) zL(osgOI-n-qdxv*69^e6RYlq%mP#A)@3zi50%XRvX;(twqq#*q`|EO)6ttkX%6jfY z-0|^3yd04mx30?h^5%qH$1hGqUgYt$0Gc#qA6fPbWtQSBZ+se*Fy`l=Ka0v8opY?s zXLfC6Gq0#Z>#IlcGiPr-eOUcow&9A)uUmkC>G2+fU{`;6sg!KuE^Hz?$y@mPx$^&; zGPNnQYSUrdr?@|vnfxO%O zb*@6?N}5t;9u~0YdM^e#;LLG0>3`&>%7eqkjr^4-wnXkYta!NMt^wg!cpntA-?jS& zmk;s(!A?5NB5r)9nWcH(A6hFMmKMfXkZ2Wp6J;J%%Dpnolb4$WjooQ;ctgk0b(Jg6JGCy^#RkP*KuD5E3p2SFq zts26@GwP7ZYc8DHTUxhM*~YtYYI9+4^I`gJN>_omr418XDt6?=?x1h^#K!XB_Dt?W zeFIOyMl}r;uXsUxXAxN3I`-|zEwjOsb|LsuK&5vNAlNtdEQt+Wz-!O7Ebn1@dli;Q zWNG_;AOX6;zD1Ino9sIxAiLha=LJ>Q*$+bDaqtHE3+|i84|Bai7e0d* zKbcm!9+3EX%*POBb~6gNxmP)TvADGRTc7ud?dc%9h{zeCz%AJS!0qkr)ozRGq9h-R z!07zbis&*A`CVKV@!zJq; zCXi3VA`e<|`@0zWQE0GE-S`FG*u^ zFJH#5y}azcyaz$!`->Q3Z`3bY`$*f~3Y8Fa!$FmeW$Ee$Jad*g&z~Vt>k80#-Is@k zPNY?3Z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Gtzi$#S3^c0vNOOpYV`+siX!WWl?m(Zm0T8!(P@ce^8AbVyZX}sS)m`RV^p! z1c4iA_V^XZ00SEI2Ynlp23A4Q8lzfN0k5mb5vkF!MyW3g4HK36^3aVhV(K^^$&qfW bsH-V325>XYBF{4EZAgWGxzwYkB)R?p*A^Ww diff --git a/stdlib/c4-dex.repx b/stdlib/c4-dex.repx index 82d2be92e976b48ccbe13fbd067251e6828bd501..d9b833048a0a86f12a56504fa84d4bdf7662cc99 100644 GIT binary patch literal 301 zcmV+|0n+{({|Eq%($w-3!YG=w&is$H^>K}osBCD^h)XD9eV33_L$XMd>LJ>lPrtc_ z%1eNa4*&me9&arx3@nk4|NYiDo>-TqWdkIz0?~vr4H!Z=oGD0uQyokFEUA`l&*t-9 z!le>Xv<0>~$|vOVWOJ0{1UOa@+jvvZyu<{pi1!OxjPgS-Q2*ueca%Qrwe^cTsvUX% z#<$p?Z}P zJU>;XCR`_B0o*cS1NIy}Z752A!7J`QCAWv8)_%eG{BH^_#Au;bOIQi41Xcp8fXx-- z_R;T1U6+2?7Z(>fVl#IFib~P`P?eaI{~AyaBL46S?@Nbat`@u8`SL|h*=^rLkbaf~ literal 201 zcmV;)05<;{e*^%==egW(tZiw5h2aGl-^uTP z`?eMs7D*tQP-0R80dn1o-KDn+lZ`CTq?APiSrwP*myECsGM%Cdil5*F+L~AvO=2x* zTVgfXr9aUFgc@i#f;@_2tfuls50gcl69R8blZGd7c6tI=o;7DsV7 z6orIE3u6Z1z