I want to use a svg image as a background to my application. A colleague created a quick sketch of a background with inkspace that looks like this:
This is added as binary data through the projucer. Various viewers including the small preview version of the image shown in the projucer display it correctly. However, when it gets drawn in a JUCE component some additional lines and other stuff, my colleague obviously used to create the image but made invisible before exporting it as svg appear so that it looks like this:
(Please ignore the sliders… )
It gets simply drawn like that:
// private member of the component containing it ScopedPointer<Drawable> background = Drawable::createFromImageData(BinaryData::ALL_Example_svg, BinaryData::ALL_Example_svgSize); // ... // this is called in "paint" Rectangle<float> windowArea (0, 0, getWidth(), getHeight()); background->drawWithin(g, windowArea, RectanglePlacement::centred, 1.0);
So, what’s wrong here? Why does JUCE draw stuff other editors don’t show? How could this be fixed?
Thank you & have a nice Sunday!