]> granicus.if.org Git - graphviz/commitdiff
tests: test_edge_node_overlap_utilities: use a semi-transparent color
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Tue, 13 Sep 2022 18:14:47 +0000 (20:14 +0200)
committerMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Tue, 20 Sep 2022 15:53:06 +0000 (17:53 +0200)
This makes it easier to see overlaps.

tests/test_edge_node_overlap_utilities.cpp

index b403195750a4db8e206a1b28183325ff0a544cd4..58b2cb04156a716905ac57869cb294cf3d98003f 100644 (file)
@@ -122,14 +122,17 @@ static void write_svg_files(SVGAnalyzer &svg_analyzer,
 
 /// generate DOT source based on given options
 static std::string generate_dot(const graph_options &graph_options) {
+  // use a semi-transparent color to easily see overlaps
+  const auto color = "\"#00000060\"";
   return fmt::format("digraph g1 {{"
                      "  graph [rankdir={}]"
-                     "  node [penwidth={} shape={} fontname=Courier]"
-                     "  edge [penwidth={}]"
+                     "  node [penwidth={} shape={} color={} fontname=Courier]"
+                     "  edge [penwidth={} color={}]"
                      "  a -> b"
                      "}}",
                      graph_options.rankdir, graph_options.node_penwidth,
-                     graph_options.node_shape, graph_options.edge_penwidth);
+                     graph_options.node_shape, color,
+                     graph_options.edge_penwidth, color);
 }
 
 void test_edge_node_overlap(const graph_options &graph_options,