mirror of
https://github.com/octoleo/plantuml.git
synced 2025-01-02 22:50:20 +00:00
#437-Implement arrow style color
This commit is contained in:
parent
0575e7cf08
commit
b6a5270b9c
@ -91,6 +91,10 @@ import net.sourceforge.plantuml.project.time.Day;
|
|||||||
import net.sourceforge.plantuml.project.time.DayOfWeek;
|
import net.sourceforge.plantuml.project.time.DayOfWeek;
|
||||||
import net.sourceforge.plantuml.project.timescale.TimeScale;
|
import net.sourceforge.plantuml.project.timescale.TimeScale;
|
||||||
import net.sourceforge.plantuml.style.ClockwiseTopRightBottomLeft;
|
import net.sourceforge.plantuml.style.ClockwiseTopRightBottomLeft;
|
||||||
|
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.TextBlockBackcolored;
|
import net.sourceforge.plantuml.svek.TextBlockBackcolored;
|
||||||
import net.sourceforge.plantuml.ugraphic.ImageBuilder;
|
import net.sourceforge.plantuml.ugraphic.ImageBuilder;
|
||||||
import net.sourceforge.plantuml.ugraphic.ImageParameter;
|
import net.sourceforge.plantuml.ugraphic.ImageParameter;
|
||||||
@ -288,10 +292,25 @@ public class GanttDiagram extends TitledDiagram implements ToTaskDraw, WithSprit
|
|||||||
if (printStart != null && constraint.isHidden(min, max)) {
|
if (printStart != null && constraint.isHidden(min, max)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
constraint.getUDrawable(timeScale, linksColor, this).drawU(ug);
|
|
||||||
|
// If the linksColor is the default color, we should try to get the arrow color (default is RED_DARK)
|
||||||
|
if (linksColor == HColorUtils.RED_DARK) {
|
||||||
|
constraint.getUDrawable(timeScale, getLinkColor(), this).drawU(ug);
|
||||||
|
} else {
|
||||||
|
constraint.getUDrawable(timeScale, linksColor, this).drawU(ug);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private HColor getLinkColor() {
|
||||||
|
final Style styleArrow = getDefaultStyleDefinitionArrow().getMergedStyle(getCurrentStyleBuilder());
|
||||||
|
return styleArrow.value(PName.LineColor).asColor(colorSet);
|
||||||
|
}
|
||||||
|
|
||||||
|
public StyleSignature getDefaultStyleDefinitionArrow() {
|
||||||
|
return StyleSignature.of(SName.root, SName.element, SName.ganttDiagram, SName.arrow);
|
||||||
|
}
|
||||||
|
|
||||||
private void drawTasksTitle(final UGraphic ug1) {
|
private void drawTasksTitle(final UGraphic ug1) {
|
||||||
for (Task task : tasks.values()) {
|
for (Task task : tasks.values()) {
|
||||||
if (isHidden(task)) {
|
if (isHidden(task)) {
|
||||||
@ -405,12 +424,13 @@ public class GanttDiagram extends TitledDiagram implements ToTaskDraw, WithSprit
|
|||||||
first = first.getTrueRow();
|
first = first.getTrueRow();
|
||||||
}
|
}
|
||||||
for (TaskDraw td : draws.values()) {
|
for (TaskDraw td : draws.values()) {
|
||||||
if (td == first)
|
if (td == first) {
|
||||||
skipping = false;
|
skipping = false;
|
||||||
if (skipping)
|
}
|
||||||
|
if (skipping) {
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
td.pushMe(deltaY + 1);
|
td.pushMe(deltaY + 1);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user