From: Magnus Jacobsson Date: Tue, 4 Oct 2022 13:21:11 +0000 (+0200) Subject: tests: GraphvizEdge: handle primitive arrow shape 'box' in arrowtail_outline_bbox X-Git-Tag: 7.0.0~10^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4053c9c7acbe73c735b20ee2ca2e6a86ae443f57;p=graphviz tests: GraphvizEdge: handle primitive arrow shape 'box' in arrowtail_outline_bbox --- 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; }