From: Magnus Jacobsson Date: Wed, 17 Aug 2022 20:05:54 +0000 (+0200) Subject: tests: SvgAnalyzer: GraphvizEdge add retrieval of center position X-Git-Tag: 6.0.1~32^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eb0e866c52a8fc87849efa144d12f6475e003449;p=graphviz tests: SvgAnalyzer: GraphvizEdge add retrieval of center position --- diff --git a/tests/graphviz_edge.cpp b/tests/graphviz_edge.cpp index ca33ecf0e..332b2504b 100644 --- a/tests/graphviz_edge.cpp +++ b/tests/graphviz_edge.cpp @@ -10,3 +10,5 @@ const SVG::SVGElement &GraphvizEdge::svg_g_element() const { } SVG::SVGRect GraphvizEdge::bbox() const { return m_svg_g_element.bbox(); } + +SVG::SVGPoint GraphvizEdge::center() const { return bbox().center(); } diff --git a/tests/graphviz_edge.h b/tests/graphviz_edge.h index 5e774aa81..87a810e73 100644 --- a/tests/graphviz_edge.h +++ b/tests/graphviz_edge.h @@ -16,6 +16,7 @@ public: explicit GraphvizEdge(SVG::SVGElement &svg_g_element); SVG::SVGRect bbox() const; + SVG::SVGPoint center() const; std::string_view edgeop() const; /// Return a non-mutable reference to the SVG `g` element corresponding to the /// edge