From dd45505f21da515d84454e1fcf9b363d03696864 Mon Sep 17 00:00:00 2001 From: Michael Ochmann Date: Thu, 23 Feb 2023 10:43:26 +0100 Subject: [PATCH] changed sizing of svgs --- docs/logo_qr.svg | 459 +++++++++++++++++----------------- src/renderers/SVGRenderer.hpp | 7 +- 2 files changed, 234 insertions(+), 232 deletions(-) diff --git a/docs/logo_qr.svg b/docs/logo_qr.svg index 3b3d41a..172ae6b 100644 --- a/docs/logo_qr.svg +++ b/docs/logo_qr.svg @@ -1,231 +1,232 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/renderers/SVGRenderer.hpp b/src/renderers/SVGRenderer.hpp index ded525b..c6a5a3a 100644 --- a/src/renderers/SVGRenderer.hpp +++ b/src/renderers/SVGRenderer.hpp @@ -20,11 +20,12 @@ namespace massivedynamic { std::stringstream file; std::string base = R"EOF( - +targetSize << " " << this->targetSize << "\" xml:space=\"preserve\">" << '\n'; + file << "viewBox=\"0 0 " << this->targetSize << " " << this->targetSize << "\" width=\"" << this->targetSize << "\" height=\"" << this->targetSize << "\" xml:space=\"preserve\">" << '\n'; file << " targetSize << "\" height=\"" << this->targetSize << "\" style=\"fill: white;\" />" << '\n'; float pixelSize = static_cast(this->targetSize) / static_cast(this->sourceSize + 2);