From 8c0178870889a47c46fec8f59b7c94dcabf6d126 Mon Sep 17 00:00:00 2001 From: Tomaž Vajngerl Date: Sun, 3 Mar 2019 00:00:23 +0100 Subject: parse more attributes in SvgDrawVisitor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - add additional parameters for DrawRectangle, DrawPath - parse stroke width, stroke and fill color for path and rect - parse rx, ry for rect - use getCurrentViewPort for top-level SVG rectangle Change-Id: Ife498bdaa721852ef2542ac5df2be0e86dfb4e62 Reviewed-on: https://gerrit.libreoffice.org/68785 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl --- include/basegfx/DrawCommands.hxx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'include') diff --git a/include/basegfx/DrawCommands.hxx b/include/basegfx/DrawCommands.hxx index 36321c312ba7..fda21e9231bb 100644 --- a/include/basegfx/DrawCommands.hxx +++ b/include/basegfx/DrawCommands.hxx @@ -58,10 +58,19 @@ class DrawRectangle : public DrawBase { public: basegfx::B2DRange maRectangle; + double mnRx; + double mnRy; + + double mnStrokeWidth; + std::shared_ptr mpFillColor; + std::shared_ptr mpStrokeColor; DrawRectangle(basegfx::B2DRange const& rRectangle) : DrawBase(DrawCommandType::Rectangle) , maRectangle(rRectangle) + , mnRx(1.0) + , mnRy(1.0) + , mnStrokeWidth(1.0) { } }; @@ -71,9 +80,14 @@ class DrawPath : public DrawBase public: basegfx::B2DPolyPolygon maPolyPolygon; + double mnStrokeWidth; + std::shared_ptr mpFillColor; + std::shared_ptr mpStrokeColor; + DrawPath(basegfx::B2DPolyPolygon const& rPolyPolygon) : DrawBase(DrawCommandType::Path) , maPolyPolygon(rPolyPolygon) + , mnStrokeWidth(1.0) { } }; -- cgit