From 121b42d507c662ad6f85a84fee931ac74cabb777 Mon Sep 17 00:00:00 2001 From: ed Date: Wed, 15 Aug 2018 12:54:23 +0100 Subject: [PATCH] SVG: Set the bounding box of images to ensure they are positioned correctly --- modules/juce_gui_basics/drawables/juce_SVGParser.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/juce_gui_basics/drawables/juce_SVGParser.cpp b/modules/juce_gui_basics/drawables/juce_SVGParser.cpp index c26db225e5..c267746dad 100644 --- a/modules/juce_gui_basics/drawables/juce_SVGParser.cpp +++ b/modules/juce_gui_basics/drawables/juce_SVGParser.cpp @@ -1209,6 +1209,9 @@ private: else di->setTransform (transform); + di->setBoundingBox ({ (float) xml->getDoubleAttribute ("x", 0.0), (float) xml->getDoubleAttribute ("y", 0.0), + (float) xml->getDoubleAttribute ("width", 0.0), (float) xml->getDoubleAttribute ("height", 0.0) }); + return di; } }