diff options
Diffstat (limited to 'server/tools/src/diagram_dot.rs')
| -rw-r--r-- | server/tools/src/diagram_dot.rs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/server/tools/src/diagram_dot.rs b/server/tools/src/diagram_dot.rs index fb223dbf..1701f4ab 100644 --- a/server/tools/src/diagram_dot.rs +++ b/server/tools/src/diagram_dot.rs @@ -16,7 +16,6 @@ */ -use crate::diagram_svg::node_color; use anyhow::{Result, bail}; use hurrycurry_protocol::{ Gamedata, Message, @@ -91,6 +90,16 @@ pub fn diagram_dot(data: &Gamedata, diagram: &Diagram, use_position: bool) -> Re Ok(out) } +fn node_color(node: &DiagramNode) -> &'static str { + match node.style { + NodeStyle::FinalProduct => "#555", + NodeStyle::IntermediateProduct => "#333", + NodeStyle::ProcessActive => "#47c42b", + NodeStyle::ProcessPassive => "#c4a32b", + NodeStyle::ProcessInstant => "#5452d8", + } +} + fn node_style(attrs: &mut Vec<String>, node: &DiagramNode) { let shape = match node.style { NodeStyle::FinalProduct => "circle", |