]> granicus.if.org Git - graphviz/commitdiff
tests: test_edge_node_overlap_utilities: adjust max_edge_stem_arrow_overlap for ...
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Thu, 6 Oct 2022 09:01:37 +0000 (11:01 +0200)
committerMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Sat, 29 Oct 2022 09:06:44 +0000 (11:06 +0200)
tests/test_edge_node_overlap_utilities.cpp

index 847699f6fc35d776dbcfc5024fd6968764faaa64..f0302670c3ca11aa42507fd84e3a7a0e75827c7f 100644 (file)
@@ -446,8 +446,11 @@ void test_edge_node_overlap(const graph_options &graph_options,
            // FIXME: adjust this when `curve` is fixed for penwidth
            graph_options.edge_penwidth / 2 + graphviz_bezier_clip_margin},
           {"diamond",
-           // FIXME: adjust this when `diamond` is fixed for penwidth
-           graph_options.edge_penwidth / 2 + graphviz_bezier_clip_margin},
+           [&]() { // FIXME: calculate this accurately for diamond arrow
+             const auto tip_scale = 1.8027756377319939; // empirical value
+             return graph_options.edge_penwidth / 2 * tip_scale +
+                    graphviz_bezier_clip_margin;
+           }()},
           {"dot",
            graph_options.edge_penwidth / 2 + graphviz_bezier_clip_margin},
           {"icurve",