diff options
Diffstat (limited to 'server/tools/src/diagram_svg.rs')
-rw-r--r-- | server/tools/src/diagram_svg.rs | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/server/tools/src/diagram_svg.rs b/server/tools/src/diagram_svg.rs index fe3d9de4..d006ce78 100644 --- a/server/tools/src/diagram_svg.rs +++ b/server/tools/src/diagram_svg.rs @@ -19,7 +19,7 @@ use anyhow::Result; use hurrycurry_protocol::{ Gamedata, Message, - book::{Diagram, DiagramEdge, DiagramNode, EdgeStyle, NodeStyle}, + book::{Diagram, DiagramNode, NodeStyle}, glam::Vec2, }; use std::fmt::Write; @@ -80,18 +80,16 @@ pub fn diagram_svg(data: &Gamedata, diagram: &Diagram) -> Result<String> { let tip2 = dst + (dir + dir.perp() * -0.5) * 10.; dst += dir * 5.; // prevent miter line cap from peeking out - let color = edge_color(edge); - // line path writeln!( out, - r#"<path fill="none" stroke="{color}" stroke-width="2" d="M{} {} L{} {}" />"#, + r#"<path fill="none" stroke="black" stroke-width="2" d="M{} {} L{} {}" />"#, src.x, src.y, dst.x, dst.y, )?; // tip path writeln!( out, - r#"<path fill="{color}" stroke="none" d="M{} {} L{} {} L{} {} Z" />"#, + r#"<path fill="black" stroke="none" d="M{} {} L{} {} L{} {} Z" />"#, tip0.x, tip0.y, tip1.x, tip1.y, tip2.x, tip2.y )?; } @@ -121,12 +119,6 @@ pub(crate) fn node_color(node: &DiagramNode) -> &'static str { NodeStyle::ProcessInstant => "#5452d8", } } -pub(crate) fn edge_color(edge: &DiagramEdge) -> &'static str { - match edge.style { - EdgeStyle::Regular => "#000000", - EdgeStyle::ProcessPassive => "#c4a32b", - } -} fn image_node(out: &mut String, node: &DiagramNode, path: String) -> Result<()> { if matches!( |