mirror of
https://github.com/octoleo/plantuml.git
synced 2024-11-22 04:55:10 +00:00
wip: fix minor issues
https://forum.plantuml.net/17187/verticals-separators-gantt-chart-appear-certain-conditions?show=18171#c18171 https://forum.plantuml.net/18163/no-colored-border-on-state-start-end
This commit is contained in:
parent
51e8676c17
commit
86513bfbc8
@ -248,6 +248,12 @@ stateDiagram {
|
|||||||
header {
|
header {
|
||||||
FontSize 12
|
FontSize 12
|
||||||
}
|
}
|
||||||
|
circle {
|
||||||
|
start, stop, end {
|
||||||
|
LineColor #2
|
||||||
|
BackgroundColor #2
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -326,18 +332,10 @@ activityDiagram {
|
|||||||
LineThickness 1
|
LineThickness 1
|
||||||
}
|
}
|
||||||
circle {
|
circle {
|
||||||
start {
|
start, stop, end {
|
||||||
LineColor #2
|
LineColor #2
|
||||||
BackgroundColor #2
|
BackgroundColor #2
|
||||||
}
|
}
|
||||||
stop {
|
|
||||||
LineColor #2
|
|
||||||
BackgroundColor transparent
|
|
||||||
}
|
|
||||||
end {
|
|
||||||
LineColor #2
|
|
||||||
BackgroundColor transparent
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
activityBar {
|
activityBar {
|
||||||
BackgroundColor #5
|
BackgroundColor #5
|
||||||
@ -610,18 +608,10 @@ activityDiagram {
|
|||||||
LineColor white
|
LineColor white
|
||||||
}
|
}
|
||||||
circle {
|
circle {
|
||||||
start {
|
start, stop, end {
|
||||||
LineColor #d
|
LineColor #d
|
||||||
BackgroundColor #d
|
BackgroundColor #d
|
||||||
}
|
}
|
||||||
stop {
|
|
||||||
LineColor #d
|
|
||||||
BackgroundColor transparent
|
|
||||||
}
|
|
||||||
end {
|
|
||||||
LineColor #d
|
|
||||||
BackgroundColor transparent
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
activityBar {
|
activityBar {
|
||||||
BackgroundColor #a
|
BackgroundColor #a
|
||||||
|
@ -262,6 +262,12 @@ stateDiagram {
|
|||||||
FontStyle plain
|
FontStyle plain
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
circle {
|
||||||
|
start, stop, end {
|
||||||
|
LineColor black
|
||||||
|
BackgroundColor black
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -382,18 +388,10 @@ activityDiagram {
|
|||||||
FontSize 11
|
FontSize 11
|
||||||
}
|
}
|
||||||
circle {
|
circle {
|
||||||
start {
|
start, stop, end {
|
||||||
LineColor black
|
LineColor black
|
||||||
BackgroundColor black
|
BackgroundColor black
|
||||||
}
|
}
|
||||||
stop {
|
|
||||||
LineColor black
|
|
||||||
BackgroundColor white
|
|
||||||
}
|
|
||||||
end {
|
|
||||||
LineColor black
|
|
||||||
BackgroundColor white
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
activityBar {
|
activityBar {
|
||||||
Shadowing 3.0
|
Shadowing 3.0
|
||||||
|
@ -50,7 +50,7 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.FtileAssemblySimple;
|
|||||||
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory;
|
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory;
|
||||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
|
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
|
||||||
import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileBox;
|
import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileBox;
|
||||||
import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileCircleEnd;
|
import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileCircleEndCross;
|
||||||
import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileCircleSpot;
|
import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileCircleSpot;
|
||||||
import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileCircleStart;
|
import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileCircleStart;
|
||||||
import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileCircleStop;
|
import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileCircleStop;
|
||||||
@ -66,7 +66,6 @@ import net.sourceforge.plantuml.klimt.font.UFont;
|
|||||||
import net.sourceforge.plantuml.klimt.geom.VerticalAlignment;
|
import net.sourceforge.plantuml.klimt.geom.VerticalAlignment;
|
||||||
import net.sourceforge.plantuml.stereo.Stereotype;
|
import net.sourceforge.plantuml.stereo.Stereotype;
|
||||||
import net.sourceforge.plantuml.style.ISkinParam;
|
import net.sourceforge.plantuml.style.ISkinParam;
|
||||||
import net.sourceforge.plantuml.style.PName;
|
|
||||||
import net.sourceforge.plantuml.style.SName;
|
import net.sourceforge.plantuml.style.SName;
|
||||||
import net.sourceforge.plantuml.style.Style;
|
import net.sourceforge.plantuml.style.Style;
|
||||||
import net.sourceforge.plantuml.style.StyleBuilder;
|
import net.sourceforge.plantuml.style.StyleBuilder;
|
||||||
@ -111,17 +110,13 @@ public class VCompactFactory implements FtileFactory {
|
|||||||
@Override
|
@Override
|
||||||
public Ftile start(Swimlane swimlane) {
|
public Ftile start(Swimlane swimlane) {
|
||||||
final Style style = getSignatureCircleStart().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
final Style style = getSignatureCircleStart().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||||
final HColor color = style.value(PName.LineColor).asColor(skinParam.getIHtmlColorSet());
|
return new FtileCircleStart(skinParam(), swimlane, style);
|
||||||
|
|
||||||
return new FtileCircleStart(skinParam(), color, swimlane, style);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Ftile stop(Swimlane swimlane) {
|
public Ftile stop(Swimlane swimlane) {
|
||||||
final Style style = getSignatureCircleStop().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
final Style style = getSignatureCircleStop().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||||
final HColor borderColor = style.value(PName.LineColor).asColor(skinParam.getIHtmlColorSet());
|
return new FtileCircleStop(skinParam(), swimlane, style);
|
||||||
final HColor backgroundColor = skinParam.getBackgroundColor();
|
|
||||||
return new FtileCircleStop(skinParam(), backgroundColor, borderColor, swimlane, style);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -134,10 +129,7 @@ public class VCompactFactory implements FtileFactory {
|
|||||||
@Override
|
@Override
|
||||||
public Ftile end(Swimlane swimlane) {
|
public Ftile end(Swimlane swimlane) {
|
||||||
final Style style = getSignatureCircleEnd().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
final Style style = getSignatureCircleEnd().getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||||
final HColor borderColor = style.value(PName.LineColor).asColor(skinParam.getIHtmlColorSet());
|
return new FtileCircleEndCross(skinParam(), swimlane, style);
|
||||||
final HColor backgroundColor = skinParam.getBackgroundColor();
|
|
||||||
|
|
||||||
return new FtileCircleEnd(skinParam(), backgroundColor, borderColor, swimlane, style);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -46,6 +46,7 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
|
|||||||
import net.sourceforge.plantuml.klimt.UStroke;
|
import net.sourceforge.plantuml.klimt.UStroke;
|
||||||
import net.sourceforge.plantuml.klimt.UTranslate;
|
import net.sourceforge.plantuml.klimt.UTranslate;
|
||||||
import net.sourceforge.plantuml.klimt.color.HColor;
|
import net.sourceforge.plantuml.klimt.color.HColor;
|
||||||
|
import net.sourceforge.plantuml.klimt.color.HColors;
|
||||||
import net.sourceforge.plantuml.klimt.drawing.UGraphic;
|
import net.sourceforge.plantuml.klimt.drawing.UGraphic;
|
||||||
import net.sourceforge.plantuml.klimt.font.StringBounder;
|
import net.sourceforge.plantuml.klimt.font.StringBounder;
|
||||||
import net.sourceforge.plantuml.klimt.shape.UEllipse;
|
import net.sourceforge.plantuml.klimt.shape.UEllipse;
|
||||||
@ -54,12 +55,12 @@ import net.sourceforge.plantuml.style.ISkinParam;
|
|||||||
import net.sourceforge.plantuml.style.PName;
|
import net.sourceforge.plantuml.style.PName;
|
||||||
import net.sourceforge.plantuml.style.Style;
|
import net.sourceforge.plantuml.style.Style;
|
||||||
|
|
||||||
public class FtileCircleEnd extends AbstractFtile {
|
public class FtileCircleEndCross extends AbstractFtile {
|
||||||
|
|
||||||
private static final int SIZE = 20;
|
private static final int SIZE = 20;
|
||||||
|
|
||||||
private HColor borderColor;
|
private final HColor lineColor;
|
||||||
private HColor backColor;
|
private final HColor backColor;
|
||||||
private final Swimlane swimlane;
|
private final Swimlane swimlane;
|
||||||
private double shadowing;
|
private double shadowing;
|
||||||
|
|
||||||
@ -68,14 +69,12 @@ public class FtileCircleEnd extends AbstractFtile {
|
|||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
|
|
||||||
public FtileCircleEnd(ISkinParam skinParam, HColor backColor, HColor borderColor, Swimlane swimlane, Style style) {
|
public FtileCircleEndCross(ISkinParam skinParam, Swimlane swimlane, Style style) {
|
||||||
super(skinParam);
|
super(skinParam);
|
||||||
this.borderColor = borderColor;
|
|
||||||
this.backColor = backColor;
|
|
||||||
this.swimlane = swimlane;
|
this.swimlane = swimlane;
|
||||||
this.shadowing = style.value(PName.Shadowing).asDouble();
|
this.shadowing = style.value(PName.Shadowing).asDouble();
|
||||||
this.backColor = style.value(PName.BackGroundColor).asColor(getIHtmlColorSet());
|
this.backColor = style.value(PName.BackGroundColor).asColor(getIHtmlColorSet());
|
||||||
this.borderColor = style.value(PName.LineColor).asColor(getIHtmlColorSet());
|
this.lineColor = style.value(PName.LineColor).asColor(getIHtmlColorSet());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -102,10 +101,11 @@ public class FtileCircleEnd extends AbstractFtile {
|
|||||||
|
|
||||||
final UEllipse circle = UEllipse.build(SIZE, SIZE);
|
final UEllipse circle = UEllipse.build(SIZE, SIZE);
|
||||||
circle.setDeltaShadow(shadowing);
|
circle.setDeltaShadow(shadowing);
|
||||||
ug = ug.apply(borderColor);
|
ug = ug.apply(lineColor).apply(HColors.transparent().bg());
|
||||||
final double thickness = 2.5;
|
final double thickness = 2.5;
|
||||||
ug.apply(backColor.bg()).apply(UStroke.withThickness(1.5)).apply(new UTranslate(xTheoricalPosition, yTheoricalPosition))
|
ug.apply(UStroke.withThickness(1.5)).apply(new UTranslate(xTheoricalPosition, yTheoricalPosition)).draw(circle);
|
||||||
.draw(circle);
|
|
||||||
|
ug = ug.apply(backColor.bg());
|
||||||
|
|
||||||
final double size2 = (SIZE - thickness) / Math.sqrt(2);
|
final double size2 = (SIZE - thickness) / Math.sqrt(2);
|
||||||
final double delta = (SIZE - size2) / 2;
|
final double delta = (SIZE - size2) / 2;
|
@ -43,32 +43,22 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractFtile;
|
|||||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile;
|
import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile;
|
||||||
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry;
|
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry;
|
||||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
|
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
|
||||||
import net.sourceforge.plantuml.klimt.color.HColor;
|
import net.sourceforge.plantuml.klimt.color.Colors;
|
||||||
import net.sourceforge.plantuml.klimt.color.HColors;
|
|
||||||
import net.sourceforge.plantuml.klimt.drawing.UGraphic;
|
import net.sourceforge.plantuml.klimt.drawing.UGraphic;
|
||||||
import net.sourceforge.plantuml.klimt.font.StringBounder;
|
import net.sourceforge.plantuml.klimt.font.StringBounder;
|
||||||
import net.sourceforge.plantuml.klimt.shape.UEllipse;
|
|
||||||
import net.sourceforge.plantuml.style.ISkinParam;
|
import net.sourceforge.plantuml.style.ISkinParam;
|
||||||
import net.sourceforge.plantuml.style.PName;
|
|
||||||
import net.sourceforge.plantuml.style.Style;
|
import net.sourceforge.plantuml.style.Style;
|
||||||
|
import net.sourceforge.plantuml.svek.image.CircleStart;
|
||||||
|
|
||||||
public class FtileCircleStart extends AbstractFtile {
|
public class FtileCircleStart extends AbstractFtile {
|
||||||
|
|
||||||
private static final int SIZE = 20;
|
private final CircleStart circle;
|
||||||
|
|
||||||
private HColor backColor;
|
|
||||||
private HColor borderColor;
|
|
||||||
private final Swimlane swimlane;
|
private final Swimlane swimlane;
|
||||||
private double shadowing;
|
|
||||||
|
|
||||||
public FtileCircleStart(ISkinParam skinParam, HColor backColor, Swimlane swimlane, Style style) {
|
public FtileCircleStart(ISkinParam skinParam, Swimlane swimlane, Style style) {
|
||||||
super(skinParam);
|
super(skinParam);
|
||||||
this.swimlane = swimlane;
|
this.swimlane = swimlane;
|
||||||
this.backColor = backColor;
|
this.circle = new CircleStart(skinParam, style, Colors.empty());
|
||||||
this.borderColor = HColors.none();
|
|
||||||
this.shadowing = style.value(PName.Shadowing).asDouble();
|
|
||||||
this.backColor = style.value(PName.BackGroundColor).asColor(getIHtmlColorSet());
|
|
||||||
this.borderColor = style.value(PName.LineColor).asColor(getIHtmlColorSet());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -92,14 +82,13 @@ public class FtileCircleStart extends AbstractFtile {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void drawU(UGraphic ug) {
|
public void drawU(UGraphic ug) {
|
||||||
final UEllipse circle = UEllipse.build(SIZE, SIZE);
|
circle.drawU(ug);
|
||||||
circle.setDeltaShadow(shadowing);
|
|
||||||
ug.apply(borderColor).apply(backColor.bg()).draw(circle);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected FtileGeometry calculateDimensionFtile(StringBounder stringBounder) {
|
protected FtileGeometry calculateDimensionFtile(StringBounder stringBounder) {
|
||||||
return new FtileGeometry(SIZE, SIZE, SIZE / 2, 0, SIZE);
|
final double size = circle.calculateDimension(stringBounder).getWidth();
|
||||||
|
return new FtileGeometry(size, size, size / 2, 0, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -43,38 +43,29 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractFtile;
|
|||||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile;
|
import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile;
|
||||||
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry;
|
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry;
|
||||||
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
|
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
|
||||||
import net.sourceforge.plantuml.klimt.UTranslate;
|
import net.sourceforge.plantuml.klimt.color.Colors;
|
||||||
import net.sourceforge.plantuml.klimt.color.HColor;
|
|
||||||
import net.sourceforge.plantuml.klimt.color.HColors;
|
|
||||||
import net.sourceforge.plantuml.klimt.drawing.UGraphic;
|
import net.sourceforge.plantuml.klimt.drawing.UGraphic;
|
||||||
import net.sourceforge.plantuml.klimt.font.StringBounder;
|
import net.sourceforge.plantuml.klimt.font.StringBounder;
|
||||||
import net.sourceforge.plantuml.klimt.shape.UEllipse;
|
|
||||||
import net.sourceforge.plantuml.style.ISkinParam;
|
import net.sourceforge.plantuml.style.ISkinParam;
|
||||||
import net.sourceforge.plantuml.style.PName;
|
|
||||||
import net.sourceforge.plantuml.style.Style;
|
import net.sourceforge.plantuml.style.Style;
|
||||||
|
import net.sourceforge.plantuml.svek.image.CircleEnd;
|
||||||
|
|
||||||
public class FtileCircleStop extends AbstractFtile {
|
public class FtileCircleStop extends AbstractFtile {
|
||||||
|
|
||||||
private static final int SIZE = 22;
|
private static final int SIZE = 22;
|
||||||
|
|
||||||
private HColor borderColor;
|
|
||||||
private HColor backColor;
|
|
||||||
private final Swimlane swimlane;
|
private final Swimlane swimlane;
|
||||||
private double shadowing;
|
private final CircleEnd circle;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Collection<Ftile> getMyChildren() {
|
public Collection<Ftile> getMyChildren() {
|
||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
|
|
||||||
public FtileCircleStop(ISkinParam skinParam, HColor backColor, HColor borderColor, Swimlane swimlane, Style style) {
|
public FtileCircleStop(ISkinParam skinParam, Swimlane swimlane, Style style) {
|
||||||
super(skinParam);
|
super(skinParam);
|
||||||
this.borderColor = borderColor;
|
|
||||||
this.backColor = backColor;
|
|
||||||
this.swimlane = swimlane;
|
this.swimlane = swimlane;
|
||||||
this.shadowing = style.value(PName.Shadowing).asDouble();
|
this.circle = new CircleEnd(skinParam, style, Colors.empty());
|
||||||
this.backColor = style.value(PName.BackGroundColor).asColor(getIHtmlColorSet());
|
|
||||||
this.borderColor = style.value(PName.LineColor).asColor(getIHtmlColorSet());
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -94,18 +85,7 @@ public class FtileCircleStop extends AbstractFtile {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void drawU(UGraphic ug) {
|
public void drawU(UGraphic ug) {
|
||||||
final UEllipse circle = UEllipse.build(SIZE, SIZE);
|
circle.drawU(ug);
|
||||||
circle.setDeltaShadow(shadowing);
|
|
||||||
|
|
||||||
ug.apply(borderColor).apply(backColor.bg()).draw(circle);
|
|
||||||
|
|
||||||
final double delta = 5;
|
|
||||||
final UEllipse circleSmall = UEllipse.build(SIZE - delta * 2, SIZE - delta * 2);
|
|
||||||
// if (skinParam().shadowing(null)) {
|
|
||||||
// circleSmall.setDeltaShadow(3);
|
|
||||||
// }
|
|
||||||
final HColor middle = HColors.middle(borderColor, backColor);
|
|
||||||
ug.apply(middle).apply(borderColor.bg()).apply(new UTranslate(delta, delta)).draw(circleSmall);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -148,7 +148,7 @@ public class BpmElement extends AbstractConnectorPuzzle implements ConnectorPuzz
|
|||||||
|
|
||||||
public TextBlock toTextBlockInternal(ISkinParam skinParam) {
|
public TextBlock toTextBlockInternal(ISkinParam skinParam) {
|
||||||
if (type == BpmElementType.START) {
|
if (type == BpmElementType.START) {
|
||||||
return new FtileCircleStart(skinParam, HColors.BLACK, null, getStyle(skinParam));
|
return new FtileCircleStart(skinParam, null, getStyle(skinParam));
|
||||||
}
|
}
|
||||||
if (type == BpmElementType.MERGE) {
|
if (type == BpmElementType.MERGE) {
|
||||||
final HColor borderColor = SkinParamUtils.getColor(skinParam, null, ColorParam.activityBorder);
|
final HColor borderColor = SkinParamUtils.getColor(skinParam, null, ColorParam.activityBorder);
|
||||||
|
@ -58,6 +58,7 @@ public class QuoteUtils {
|
|||||||
"Qba'g Cnavp!", "Jung qb lbh zrna? Na Nsevpna be Rhebcrna fjnyybj?",
|
"Qba'g Cnavp!", "Jung qb lbh zrna? Na Nsevpna be Rhebcrna fjnyybj?",
|
||||||
"V arrq lbhe obbgf lbhe pybgurf naq lbhe zbgbeplpyr", "Lbh sbetbg gb fnl cyrnfr...",
|
"V arrq lbhe obbgf lbhe pybgurf naq lbhe zbgbeplpyr", "Lbh sbetbg gb fnl cyrnfr...",
|
||||||
"Lbh unir qvrq bs qlfragrel.", "Jbhyqa'g lbh cersre n avpr tnzr bs purff?",
|
"Lbh unir qvrq bs qlfragrel.", "Jbhyqa'g lbh cersre n avpr tnzr bs purff?",
|
||||||
|
"Ubj nobhg n avpr tnzr bs purff?",
|
||||||
"Jura lbh unir ryvzvangrq gur vzcbffvoyr, jungrire erznvaf, ubjrire vzcebonoyr, zhfg or gur gehgu.",
|
"Jura lbh unir ryvzvangrq gur vzcbffvoyr, jungrire erznvaf, ubjrire vzcebonoyr, zhfg or gur gehgu.",
|
||||||
"V xabj abj jul lbh pel. Ohg vg'f fbzrguvat V pna arire qb.",
|
"V xabj abj jul lbh pel. Ohg vg'f fbzrguvat V pna arire qb.",
|
||||||
"Erfvfgnapr vf shgvyr. Lbh jvyy or nffvzvyngrq.", "Nalguvat qvssrerag vf tbbq.",
|
"Erfvfgnapr vf shgvyr. Lbh jvyy or nffvzvyngrq.", "Nalguvat qvssrerag vf tbbq.",
|
||||||
@ -318,7 +319,11 @@ public class QuoteUtils {
|
|||||||
"cynaghzy: qvntenzf sbe pbashfvat crbcyr zber", "Ha zbeprnh dhv onynapr qh gbaareer?",
|
"cynaghzy: qvntenzf sbe pbashfvat crbcyr zber", "Ha zbeprnh dhv onynapr qh gbaareer?",
|
||||||
"Pnhtug hc va pvepyrf, pbashfvba vf abguvat arj",
|
"Pnhtug hc va pvepyrf, pbashfvba vf abguvat arj",
|
||||||
"N pbzcyrk flfgrz qrfvtarq sebz fpengpu arire jbexf naq pnaabg or cngpurq hc gb znxr vg jbex.",
|
"N pbzcyrk flfgrz qrfvtarq sebz fpengpu arire jbexf naq pnaabg or cngpurq hc gb znxr vg jbex.",
|
||||||
"Gur vagrearg vf pbzvat", "Qba'g lbh xabj guvatf unccra sbe n ernfba");
|
"Gur vagrearg vf pbzvat", "Qba'g lbh xabj guvatf unccra sbe n ernfba",
|
||||||
|
"V qba'g ernyyl srry yvxr Oneovr nalzber", "P'rfg gba abz dhr wr cbfr fhe yrf zhef qr Cnevf",
|
||||||
|
"Lbh qba'g arrq zbarl, qba'g gnxr snzr",
|
||||||
|
"V qba'g nyjnlf grfg zl pbqr, ohg jura V qb, V qb vg va cebqhpgvba.", "Npgvingr gur Bzrtn Guvegrra.",
|
||||||
|
"V xabj vg'f Jrqarfqnl, ohg jung n jrrx, uhu?", "Vs Vg Pbzcvyrf, Vg Jbexf", "Unzfgre ng irybpvgl crnx");
|
||||||
|
|
||||||
private QuoteUtils() {
|
private QuoteUtils() {
|
||||||
}
|
}
|
||||||
|
@ -53,6 +53,10 @@ public abstract class TimeHeaderCalendar extends TimeHeader {
|
|||||||
this.thParam = thParam;
|
this.thParam = thParam;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected final boolean isBold(Day wink) {
|
||||||
|
return thParam.getVerticalSeparatorBefore().contains(wink);
|
||||||
|
}
|
||||||
|
|
||||||
protected final Locale locale() {
|
protected final Locale locale() {
|
||||||
return thParam.getLocale();
|
return thParam.getLocale();
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
package net.sourceforge.plantuml.project.draw;
|
package net.sourceforge.plantuml.project.draw;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import net.sourceforge.plantuml.klimt.UTranslate;
|
import net.sourceforge.plantuml.klimt.UTranslate;
|
||||||
import net.sourceforge.plantuml.klimt.color.HColor;
|
import net.sourceforge.plantuml.klimt.color.HColor;
|
||||||
@ -59,16 +58,10 @@ public class TimeHeaderDaily extends TimeHeaderCalendar {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private final Map<Day, String> nameDays;
|
private final Map<Day, String> nameDays;
|
||||||
private final Set<Day> verticalSeparators;
|
|
||||||
|
|
||||||
public TimeHeaderDaily(TimeHeaderParameters thParam, Map<Day, String> nameDays, Day printStart, Day printEnd) {
|
public TimeHeaderDaily(TimeHeaderParameters thParam, Map<Day, String> nameDays, Day printStart, Day printEnd) {
|
||||||
super(thParam, new TimeScaleDaily(thParam.getStartingDay(), thParam.getScale(), printStart));
|
super(thParam, new TimeScaleDaily(thParam.getStartingDay(), thParam.getScale(), printStart));
|
||||||
this.nameDays = nameDays;
|
this.nameDays = nameDays;
|
||||||
this.verticalSeparators = thParam.getVerticalSeparatorBefore();
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean isBold(Day wink) {
|
|
||||||
return verticalSeparators.contains(wink);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -62,11 +62,19 @@ public class TimeHeaderMonthly extends TimeHeaderCalendar {
|
|||||||
drawTextsBackground(ug, totalHeightWithoutFooter);
|
drawTextsBackground(ug, totalHeightWithoutFooter);
|
||||||
drawYears(ug);
|
drawYears(ug);
|
||||||
drawMonths(ug.apply(UTranslate.dy(16)));
|
drawMonths(ug.apply(UTranslate.dy(16)));
|
||||||
|
printSmallVbars(ug, totalHeightWithoutFooter);
|
||||||
drawHline(ug, 0);
|
drawHline(ug, 0);
|
||||||
drawHline(ug, 16);
|
drawHline(ug, 16);
|
||||||
drawHline(ug, getFullHeaderHeight());
|
drawHline(ug, getFullHeaderHeight());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void printSmallVbars(final UGraphic ug, double totalHeightWithoutFooter) {
|
||||||
|
for (Day wink = min; wink.compareTo(max) <= 0; wink = wink.increment())
|
||||||
|
if (isBold(wink))
|
||||||
|
drawVbar(ug, getTimeScale().getStartingPosition(wink), getFullHeaderHeight(), totalHeightWithoutFooter,
|
||||||
|
isBold(wink));
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawTimeFooter(UGraphic ug) {
|
public void drawTimeFooter(UGraphic ug) {
|
||||||
ug = ug.apply(UTranslate.dy(3));
|
ug = ug.apply(UTranslate.dy(3));
|
||||||
|
@ -62,11 +62,19 @@ public class TimeHeaderQuarterly extends TimeHeaderCalendar {
|
|||||||
drawTextsBackground(ug, totalHeightWithoutFooter);
|
drawTextsBackground(ug, totalHeightWithoutFooter);
|
||||||
drawYears(ug);
|
drawYears(ug);
|
||||||
drawQuarters(ug.apply(UTranslate.dy(16)));
|
drawQuarters(ug.apply(UTranslate.dy(16)));
|
||||||
|
printSmallVbars(ug, totalHeightWithoutFooter);
|
||||||
drawHline(ug, 0);
|
drawHline(ug, 0);
|
||||||
drawHline(ug, 16);
|
drawHline(ug, 16);
|
||||||
drawHline(ug, getFullHeaderHeight());
|
drawHline(ug, getFullHeaderHeight());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void printSmallVbars(final UGraphic ug, double totalHeightWithoutFooter) {
|
||||||
|
for (Day wink = min; wink.compareTo(max) <= 0; wink = wink.increment())
|
||||||
|
if (isBold(wink))
|
||||||
|
drawVbar(ug, getTimeScale().getStartingPosition(wink), getFullHeaderHeight(), totalHeightWithoutFooter,
|
||||||
|
isBold(wink));
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawTimeFooter(UGraphic ug) {
|
public void drawTimeFooter(UGraphic ug) {
|
||||||
ug = ug.apply(UTranslate.dy(3));
|
ug = ug.apply(UTranslate.dy(3));
|
||||||
|
@ -108,12 +108,17 @@ public class TimeHeaderWeekly extends TimeHeaderCalendar {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void printSmallVbars(final UGraphic ug, double totalHeightWithoutFooter) {
|
private void printSmallVbars(final UGraphic ug, double totalHeightWithoutFooter) {
|
||||||
for (Day wink = min; wink.compareTo(max) <= 0; wink = wink.increment()) {
|
for (Day wink = min; wink.compareTo(max) <= 0; wink = wink.increment())
|
||||||
if (wink.getDayOfWeek() == weekNumberStrategy.getFirstDayOfWeek()) {
|
if (wink.getDayOfWeek() == weekNumberStrategy.getFirstDayOfWeek())
|
||||||
drawVbar(ug, getTimeScale().getStartingPosition(wink), Y_POS_ROW16(), totalHeightWithoutFooter, false);
|
drawVbar(ug, getTimeScale().getStartingPosition(wink), Y_POS_ROW16(), totalHeightWithoutFooter, false);
|
||||||
}
|
|
||||||
}
|
|
||||||
drawVbar(ug, getTimeScale().getEndingPosition(max), Y_POS_ROW16(), totalHeightWithoutFooter, false);
|
drawVbar(ug, getTimeScale().getEndingPosition(max), Y_POS_ROW16(), totalHeightWithoutFooter, false);
|
||||||
|
|
||||||
|
for (Day wink = min; wink.compareTo(max) <= 0; wink = wink.increment())
|
||||||
|
if (isBold(wink))
|
||||||
|
drawVbar(ug, getTimeScale().getStartingPosition(wink), getFullHeaderHeight(), totalHeightWithoutFooter,
|
||||||
|
isBold(wink));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void printDaysOfMonth(final UGraphic ug) {
|
private void printDaysOfMonth(final UGraphic ug) {
|
||||||
|
@ -61,10 +61,18 @@ public class TimeHeaderYearly extends TimeHeaderCalendar {
|
|||||||
public void drawTimeHeader(final UGraphic ug, double totalHeightWithoutFooter) {
|
public void drawTimeHeader(final UGraphic ug, double totalHeightWithoutFooter) {
|
||||||
drawTextsBackground(ug, totalHeightWithoutFooter);
|
drawTextsBackground(ug, totalHeightWithoutFooter);
|
||||||
drawYears(ug);
|
drawYears(ug);
|
||||||
|
printSmallVbars(ug, totalHeightWithoutFooter);
|
||||||
drawHline(ug, 0);
|
drawHline(ug, 0);
|
||||||
drawHline(ug, getFullHeaderHeight());
|
drawHline(ug, getFullHeaderHeight());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void printSmallVbars(final UGraphic ug, double totalHeightWithoutFooter) {
|
||||||
|
for (Day wink = min; wink.compareTo(max) <= 0; wink = wink.increment())
|
||||||
|
if (isBold(wink))
|
||||||
|
drawVbar(ug, getTimeScale().getStartingPosition(wink), getFullHeaderHeight(), totalHeightWithoutFooter,
|
||||||
|
isBold(wink));
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawTimeFooter(UGraphic ug) {
|
public void drawTimeFooter(UGraphic ug) {
|
||||||
ug = ug.apply(UTranslate.dy(3));
|
ug = ug.apply(UTranslate.dy(3));
|
||||||
|
104
src/net/sourceforge/plantuml/svek/image/CircleEnd.java
Normal file
104
src/net/sourceforge/plantuml/svek/image/CircleEnd.java
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
/* ========================================================================
|
||||||
|
* PlantUML : a free UML diagram generator
|
||||||
|
* ========================================================================
|
||||||
|
*
|
||||||
|
* (C) Copyright 2009-2024, Arnaud Roques
|
||||||
|
*
|
||||||
|
* Project Info: https://plantuml.com
|
||||||
|
*
|
||||||
|
* If you like this project or if you find it useful, you can support us at:
|
||||||
|
*
|
||||||
|
* https://plantuml.com/patreon (only 1$ per month!)
|
||||||
|
* https://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.svek.image;
|
||||||
|
|
||||||
|
import net.sourceforge.plantuml.klimt.UShape;
|
||||||
|
import net.sourceforge.plantuml.klimt.UTranslate;
|
||||||
|
import net.sourceforge.plantuml.klimt.color.ColorType;
|
||||||
|
import net.sourceforge.plantuml.klimt.color.Colors;
|
||||||
|
import net.sourceforge.plantuml.klimt.color.HColor;
|
||||||
|
import net.sourceforge.plantuml.klimt.color.HColors;
|
||||||
|
import net.sourceforge.plantuml.klimt.drawing.UGraphic;
|
||||||
|
import net.sourceforge.plantuml.klimt.font.StringBounder;
|
||||||
|
import net.sourceforge.plantuml.klimt.geom.XDimension2D;
|
||||||
|
import net.sourceforge.plantuml.klimt.shape.UDrawable;
|
||||||
|
import net.sourceforge.plantuml.klimt.shape.UEllipse;
|
||||||
|
import net.sourceforge.plantuml.style.ISkinParam;
|
||||||
|
import net.sourceforge.plantuml.style.PName;
|
||||||
|
import net.sourceforge.plantuml.style.Style;
|
||||||
|
|
||||||
|
public class CircleEnd implements UDrawable {
|
||||||
|
|
||||||
|
private static final int SIZE = 22;
|
||||||
|
|
||||||
|
private final ISkinParam skinParam;
|
||||||
|
private final Style style;
|
||||||
|
private final Colors colors;
|
||||||
|
|
||||||
|
public CircleEnd(ISkinParam skinParam, Style style, Colors colors) {
|
||||||
|
this.style = style;
|
||||||
|
this.colors = colors;
|
||||||
|
this.skinParam = skinParam;
|
||||||
|
}
|
||||||
|
|
||||||
|
public XDimension2D calculateDimension(StringBounder stringBounder) {
|
||||||
|
return new XDimension2D(SIZE, SIZE);
|
||||||
|
}
|
||||||
|
|
||||||
|
final public void drawU(UGraphic ug) {
|
||||||
|
final UEllipse circle = UEllipse.build(SIZE, SIZE);
|
||||||
|
|
||||||
|
HColor backColor = style.value(PName.BackGroundColor).asColor(skinParam.getIHtmlColorSet());
|
||||||
|
HColor lineColor = style.value(PName.LineColor).asColor(skinParam.getIHtmlColorSet());
|
||||||
|
|
||||||
|
if (colors.getColor(ColorType.BACK) != null) {
|
||||||
|
lineColor = colors.getColor(ColorType.BACK);
|
||||||
|
backColor = colors.getColor(ColorType.BACK);
|
||||||
|
}
|
||||||
|
|
||||||
|
final double shadowing = style.value(PName.Shadowing).asDouble();
|
||||||
|
|
||||||
|
circle.setDeltaShadow(shadowing);
|
||||||
|
ug.apply(HColors.none().bg()).apply(lineColor).draw(circle);
|
||||||
|
|
||||||
|
final double delta = 5;
|
||||||
|
final UShape circleSmall = UEllipse.build(SIZE - delta * 2, SIZE - delta * 2);
|
||||||
|
|
||||||
|
// This is *really* weird, but because of anti-aliasing we have to use middle
|
||||||
|
// color when lineColor and backColor are the same (!)
|
||||||
|
if (lineColor.equals(backColor)) {
|
||||||
|
final HColor middle = HColors.middle(lineColor, backColor);
|
||||||
|
ug = ug.apply(backColor.bg());
|
||||||
|
ug = ug.apply(middle);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
ug = ug.apply(backColor.bg());
|
||||||
|
ug = ug.apply(lineColor);
|
||||||
|
}
|
||||||
|
ug.apply(new UTranslate(delta, delta)).draw(circleSmall);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
84
src/net/sourceforge/plantuml/svek/image/CircleStart.java
Normal file
84
src/net/sourceforge/plantuml/svek/image/CircleStart.java
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
/* ========================================================================
|
||||||
|
* PlantUML : a free UML diagram generator
|
||||||
|
* ========================================================================
|
||||||
|
*
|
||||||
|
* (C) Copyright 2009-2024, Arnaud Roques
|
||||||
|
*
|
||||||
|
* Project Info: https://plantuml.com
|
||||||
|
*
|
||||||
|
* If you like this project or if you find it useful, you can support us at:
|
||||||
|
*
|
||||||
|
* https://plantuml.com/patreon (only 1$ per month!)
|
||||||
|
* https://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.svek.image;
|
||||||
|
|
||||||
|
import net.sourceforge.plantuml.klimt.color.ColorType;
|
||||||
|
import net.sourceforge.plantuml.klimt.color.Colors;
|
||||||
|
import net.sourceforge.plantuml.klimt.color.HColor;
|
||||||
|
import net.sourceforge.plantuml.klimt.drawing.UGraphic;
|
||||||
|
import net.sourceforge.plantuml.klimt.font.StringBounder;
|
||||||
|
import net.sourceforge.plantuml.klimt.geom.XDimension2D;
|
||||||
|
import net.sourceforge.plantuml.klimt.shape.UDrawable;
|
||||||
|
import net.sourceforge.plantuml.klimt.shape.UEllipse;
|
||||||
|
import net.sourceforge.plantuml.style.ISkinParam;
|
||||||
|
import net.sourceforge.plantuml.style.PName;
|
||||||
|
import net.sourceforge.plantuml.style.Style;
|
||||||
|
|
||||||
|
public class CircleStart implements UDrawable {
|
||||||
|
|
||||||
|
private static final int SIZE = 20;
|
||||||
|
|
||||||
|
private final ISkinParam skinParam;
|
||||||
|
private final Style style;
|
||||||
|
private final Colors colors;
|
||||||
|
|
||||||
|
public CircleStart(ISkinParam skinParam, Style style, Colors colors) {
|
||||||
|
this.style = style;
|
||||||
|
this.colors = colors;
|
||||||
|
this.skinParam = skinParam;
|
||||||
|
}
|
||||||
|
|
||||||
|
public XDimension2D calculateDimension(StringBounder stringBounder) {
|
||||||
|
return new XDimension2D(SIZE, SIZE);
|
||||||
|
}
|
||||||
|
|
||||||
|
final public void drawU(UGraphic ug) {
|
||||||
|
final UEllipse circle = UEllipse.build(SIZE, SIZE);
|
||||||
|
|
||||||
|
HColor backColor = style.value(PName.BackGroundColor).asColor(skinParam.getIHtmlColorSet());
|
||||||
|
HColor lineColor = style.value(PName.LineColor).asColor(skinParam.getIHtmlColorSet());
|
||||||
|
if (colors.getColor(ColorType.BACK) != null) {
|
||||||
|
lineColor = colors.getColor(ColorType.BACK);
|
||||||
|
backColor = colors.getColor(ColorType.BACK);
|
||||||
|
}
|
||||||
|
|
||||||
|
final double shadowing = style.value(PName.Shadowing).asDouble();
|
||||||
|
|
||||||
|
circle.setDeltaShadow(shadowing);
|
||||||
|
ug.apply(lineColor).apply(backColor.bg()).draw(circle);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -36,17 +36,10 @@
|
|||||||
package net.sourceforge.plantuml.svek.image;
|
package net.sourceforge.plantuml.svek.image;
|
||||||
|
|
||||||
import net.sourceforge.plantuml.abel.Entity;
|
import net.sourceforge.plantuml.abel.Entity;
|
||||||
import net.sourceforge.plantuml.klimt.UShape;
|
|
||||||
import net.sourceforge.plantuml.klimt.UTranslate;
|
|
||||||
import net.sourceforge.plantuml.klimt.color.ColorType;
|
|
||||||
import net.sourceforge.plantuml.klimt.color.HColor;
|
|
||||||
import net.sourceforge.plantuml.klimt.color.HColors;
|
|
||||||
import net.sourceforge.plantuml.klimt.drawing.UGraphic;
|
import net.sourceforge.plantuml.klimt.drawing.UGraphic;
|
||||||
import net.sourceforge.plantuml.klimt.font.StringBounder;
|
import net.sourceforge.plantuml.klimt.font.StringBounder;
|
||||||
import net.sourceforge.plantuml.klimt.geom.XDimension2D;
|
import net.sourceforge.plantuml.klimt.geom.XDimension2D;
|
||||||
import net.sourceforge.plantuml.klimt.shape.UEllipse;
|
|
||||||
import net.sourceforge.plantuml.style.ISkinParam;
|
import net.sourceforge.plantuml.style.ISkinParam;
|
||||||
import net.sourceforge.plantuml.style.PName;
|
|
||||||
import net.sourceforge.plantuml.style.SName;
|
import net.sourceforge.plantuml.style.SName;
|
||||||
import net.sourceforge.plantuml.style.Style;
|
import net.sourceforge.plantuml.style.Style;
|
||||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||||
@ -55,7 +48,8 @@ import net.sourceforge.plantuml.svek.ShapeType;
|
|||||||
|
|
||||||
public class EntityImageCircleEnd extends AbstractEntityImage {
|
public class EntityImageCircleEnd extends AbstractEntityImage {
|
||||||
|
|
||||||
private static final int SIZE = 20;
|
private static final int SIZE = 22;
|
||||||
|
private final CircleEnd circle;
|
||||||
|
|
||||||
public StyleSignatureBasic getDefaultStyleDefinitionCircle() {
|
public StyleSignatureBasic getDefaultStyleDefinitionCircle() {
|
||||||
return StyleSignatureBasic.of(SName.root, SName.element, getSkinParam().getUmlDiagramType().getStyleName(),
|
return StyleSignatureBasic.of(SName.root, SName.element, getSkinParam().getUmlDiagramType().getStyleName(),
|
||||||
@ -64,6 +58,8 @@ public class EntityImageCircleEnd extends AbstractEntityImage {
|
|||||||
|
|
||||||
public EntityImageCircleEnd(Entity entity, ISkinParam skinParam) {
|
public EntityImageCircleEnd(Entity entity, ISkinParam skinParam) {
|
||||||
super(entity, skinParam);
|
super(entity, skinParam);
|
||||||
|
final Style style = getDefaultStyleDefinitionCircle().getMergedStyle(getSkinParam().getCurrentStyleBuilder());
|
||||||
|
this.circle = new CircleEnd(skinParam, style, entity.getColors());
|
||||||
}
|
}
|
||||||
|
|
||||||
public XDimension2D calculateDimension(StringBounder stringBounder) {
|
public XDimension2D calculateDimension(StringBounder stringBounder) {
|
||||||
@ -71,20 +67,7 @@ public class EntityImageCircleEnd extends AbstractEntityImage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final public void drawU(UGraphic ug) {
|
final public void drawU(UGraphic ug) {
|
||||||
final UEllipse circle = UEllipse.build(SIZE, SIZE);
|
circle.drawU(ug);
|
||||||
|
|
||||||
final Style style = getDefaultStyleDefinitionCircle().getMergedStyle(getSkinParam().getCurrentStyleBuilder());
|
|
||||||
HColor color = getEntity().getColors().getColor(ColorType.BACK);
|
|
||||||
if (color == null)
|
|
||||||
color = style.value(PName.LineColor).asColor(getSkinParam().getIHtmlColorSet());
|
|
||||||
final double shadowing = style.value(PName.Shadowing).asDouble();
|
|
||||||
|
|
||||||
circle.setDeltaShadow(shadowing);
|
|
||||||
ug.apply(HColors.none().bg()).apply(color).draw(circle);
|
|
||||||
|
|
||||||
final double delta = 4;
|
|
||||||
final UShape circleSmall = UEllipse.build(SIZE - delta * 2, SIZE - delta * 2);
|
|
||||||
ug.apply(color.bg()).apply(HColors.none()).apply(new UTranslate(delta + 0.5, delta + 0.5)).draw(circleSmall);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public ShapeType getShapeType() {
|
public ShapeType getShapeType() {
|
||||||
|
@ -36,15 +36,10 @@
|
|||||||
package net.sourceforge.plantuml.svek.image;
|
package net.sourceforge.plantuml.svek.image;
|
||||||
|
|
||||||
import net.sourceforge.plantuml.abel.Entity;
|
import net.sourceforge.plantuml.abel.Entity;
|
||||||
import net.sourceforge.plantuml.klimt.color.ColorType;
|
|
||||||
import net.sourceforge.plantuml.klimt.color.HColor;
|
|
||||||
import net.sourceforge.plantuml.klimt.color.HColors;
|
|
||||||
import net.sourceforge.plantuml.klimt.drawing.UGraphic;
|
import net.sourceforge.plantuml.klimt.drawing.UGraphic;
|
||||||
import net.sourceforge.plantuml.klimt.font.StringBounder;
|
import net.sourceforge.plantuml.klimt.font.StringBounder;
|
||||||
import net.sourceforge.plantuml.klimt.geom.XDimension2D;
|
import net.sourceforge.plantuml.klimt.geom.XDimension2D;
|
||||||
import net.sourceforge.plantuml.klimt.shape.UEllipse;
|
|
||||||
import net.sourceforge.plantuml.style.ISkinParam;
|
import net.sourceforge.plantuml.style.ISkinParam;
|
||||||
import net.sourceforge.plantuml.style.PName;
|
|
||||||
import net.sourceforge.plantuml.style.SName;
|
import net.sourceforge.plantuml.style.SName;
|
||||||
import net.sourceforge.plantuml.style.Style;
|
import net.sourceforge.plantuml.style.Style;
|
||||||
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
import net.sourceforge.plantuml.style.StyleSignatureBasic;
|
||||||
@ -53,7 +48,7 @@ import net.sourceforge.plantuml.svek.ShapeType;
|
|||||||
|
|
||||||
public class EntityImageCircleStart extends AbstractEntityImage {
|
public class EntityImageCircleStart extends AbstractEntityImage {
|
||||||
|
|
||||||
private static final int SIZE = 20;
|
private final CircleStart circle;
|
||||||
|
|
||||||
public StyleSignatureBasic getDefaultStyleDefinitionCircle() {
|
public StyleSignatureBasic getDefaultStyleDefinitionCircle() {
|
||||||
return StyleSignatureBasic.of(SName.root, SName.element, getSkinParam().getUmlDiagramType().getStyleName(),
|
return StyleSignatureBasic.of(SName.root, SName.element, getSkinParam().getUmlDiagramType().getStyleName(),
|
||||||
@ -62,24 +57,16 @@ public class EntityImageCircleStart extends AbstractEntityImage {
|
|||||||
|
|
||||||
public EntityImageCircleStart(Entity entity, ISkinParam skinParam) {
|
public EntityImageCircleStart(Entity entity, ISkinParam skinParam) {
|
||||||
super(entity, skinParam);
|
super(entity, skinParam);
|
||||||
|
final Style style = getDefaultStyleDefinitionCircle().getMergedStyle(getSkinParam().getCurrentStyleBuilder());
|
||||||
|
this.circle = new CircleStart(skinParam, style, entity.getColors());
|
||||||
}
|
}
|
||||||
|
|
||||||
public XDimension2D calculateDimension(StringBounder stringBounder) {
|
public XDimension2D calculateDimension(StringBounder stringBounder) {
|
||||||
return new XDimension2D(SIZE, SIZE);
|
return circle.calculateDimension(stringBounder);
|
||||||
}
|
}
|
||||||
|
|
||||||
final public void drawU(UGraphic ug) {
|
final public void drawU(UGraphic ug) {
|
||||||
final UEllipse circle = UEllipse.build(SIZE, SIZE);
|
circle.drawU(ug);
|
||||||
|
|
||||||
final Style style = getDefaultStyleDefinitionCircle().getMergedStyle(getSkinParam().getCurrentStyleBuilder());
|
|
||||||
HColor color = getEntity().getColors().getColor(ColorType.BACK);
|
|
||||||
if (color == null)
|
|
||||||
color = style.value(PName.LineColor).asColor(getSkinParam().getIHtmlColorSet());
|
|
||||||
|
|
||||||
final double shadowing = style.value(PName.Shadowing).asDouble();
|
|
||||||
|
|
||||||
circle.setDeltaShadow(shadowing);
|
|
||||||
ug.apply(color.bg()).apply(HColors.none()).draw(circle);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public ShapeType getShapeType() {
|
public ShapeType getShapeType() {
|
||||||
|
Loading…
Reference in New Issue
Block a user