Enhance flow arrows

This commit is contained in:
2026-08-03 15:54:19 +02:00
parent 19deed4fd7
commit ac45092e1d
6 changed files with 76 additions and 59 deletions
+2 -2
View File
@@ -431,13 +431,13 @@ namespace PamhagenSysCtrl.Helpers {
}
}
public void ColorPipesAdjacientToPath(Path path, Brush? color1, Brush? color2) {
public void ColorPipesAdjacientToPath(Path path, Brush? color1, bool flowArrows, Brush? color2) {
var color = color1;
var flowPathOffset = 0.0;
HashSet<IEdge> visited = [];
foreach (var (edge, node) in path.Hops) {
edge.Highlight = color1;
edge.Flow = color1 == PamhagenBrushes.Green ? (edge.End == node, flowPathOffset) : null;
edge.Flow = flowArrows ? (edge.End == node, flowPathOffset) : null;
if (edge.Flow != null) flowPathOffset += edge.FlowLength;
visited.Add(edge);
if (node is Pump) color = color2;