From 4053c9c7acbe73c735b20ee2ca2e6a86ae443f57 Mon Sep 17 00:00:00 2001 From: Magnus Jacobsson Date: Tue, 4 Oct 2022 15:21:11 +0200 Subject: [PATCH] tests: GraphvizEdge: handle primitive arrow shape 'box' in arrowtail_outline_bbox --- tests/graphviz_edge.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/graphviz_edge.cpp b/tests/graphviz_edge.cpp index c65a13a3a..35c75015f 100644 --- a/tests/graphviz_edge.cpp +++ b/tests/graphviz_edge.cpp @@ -61,7 +61,13 @@ SVG::SVGRect GraphvizEdge::arrowtail_outline_bbox( const auto index = 0; auto edge_arrowtail = m_svg_g_element.find_child(SVG::SVGElementType::Polygon, index); - const auto edge_arrowtail_bbox = edge_arrowtail.outline_bbox(); + auto edge_arrowtail_bbox = edge_arrowtail.outline_bbox(); + if (primitive_arrow_shape == "box") { + auto edge_arrowtail_stem = + m_svg_g_element.find_child(SVG::SVGElementType::Polyline, index); + auto edge_arrowtail_stem_bbox = edge_arrowtail_stem.outline_bbox(); + edge_arrowtail_bbox.extend(edge_arrowtail_stem_bbox); + } return edge_arrowtail_bbox; } -- 2.40.0