Hi guys,
I’m building a resizable GUI and I’m using an SVG for my logo. I’ve been able to draw it as a DrawableComposite, but I’m struggling with its positioning and, more importantly, its colour. Since users will be able to change the color palette of this product, I do really need that the logo colour should change according to the user selection. I tried with “replaceColour”, but it’s not working.
Thanks!
Edit:
Solved this way
MemoryInputStream svgLogoStream(BinaryData::logo_svg, BinaryData::logo_svgSize, false); svgLogo = dynamic_cast <DrawableComposite*> (Drawable::createFromImageDataStream (svgLogoStream)); if (svgLogo != nullptr) { svgLogo->replaceColour(Colours::black, textColourLight); AffineTransform transform = AffineTransform::scale(0.15f, 0.15f).followedBy(AffineTransform::translation(10.f, 10.f)); svgLogo->draw (g, 1.0f, transform); }