]> granicus.if.org Git - graphviz/commitdiff
tests: test_edge_node_overlap_utilities: handle arrow type 'none'
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Thu, 6 Oct 2022 09:39:22 +0000 (11:39 +0200)
committerMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Fri, 4 Nov 2022 17:45:17 +0000 (18:45 +0100)
tests/test_edge_node_overlap_utilities.cpp

index f0302670c3ca11aa42507fd84e3a7a0e75827c7f..888e7678ed3ca33cc7dc850f348923570d129bed 100644 (file)
@@ -269,7 +269,8 @@ static bool check_analyzed_svg(SVGAnalyzer &svg_analyzer,
   const auto edge_stem_bbox = edge_stem.outline_bbox();
 
   // check overlap of edge stem and arrowhead
-  if (dir == "forward" || dir == "both") {
+  if ((dir == "forward" || dir == "both") &&
+      primitive_arrowhead_shape != "none") {
     const auto edge_arrowhead_bbox =
         edge.arrowhead_outline_bbox(dir, primitive_arrowhead_shape);
     const auto overlap_bbox = edge_stem_bbox.intersection(edge_arrowhead_bbox);
@@ -300,7 +301,7 @@ static bool check_analyzed_svg(SVGAnalyzer &svg_analyzer,
   }
 
   // check overlap of edge stem and arrowtail
-  if (dir == "back" || dir == "both") {
+  if ((dir == "back" || dir == "both") && primitive_arrowtail_shape != "none") {
     const auto edge_arrowtail_bbox =
         edge.arrowtail_outline_bbox(dir, primitive_arrowtail_shape);
     const auto overlap_bbox = edge_stem_bbox.intersection(edge_arrowtail_bbox);
@@ -462,9 +463,6 @@ void test_edge_node_overlap(const graph_options &graph_options,
              return graph_options.edge_penwidth / 2 * tip_scale +
                     graphviz_bezier_clip_margin;
            }()},
-          {"none",
-           // FIXME: adjust this when `none` is fixed for penwidth
-           graph_options.edge_penwidth / 2 + graphviz_bezier_clip_margin},
           {"normal",
            graph_options.edge_penwidth / 2 + graphviz_bezier_clip_margin},
           {"tee",