Skip to content

Commit

Permalink
Work around broken svg rendering on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
FigBug committed May 21, 2024
1 parent 5e1261d commit 6bdcab8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion modules/gin_gui/images/gin_imageutilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,17 @@

juce::Image rasterizeSVG (juce::String svgText, int w, int h)
{
#if JUCE_WINDOWS
juce::Image img (juce::Image::ARGB, w, h, true, juce::SoftwareImageType());
#else
juce::Image img (juce::Image::ARGB, w, h, true);
#endif

if (auto svg = juce::XmlDocument::parse (svgText))
{
const juce::MessageManagerLock mmLock ( juce::Thread::getCurrentThread () );

if ( mmLock.lockWasGained () )
if (mmLock.lockWasGained())
{
auto drawable = juce::Drawable::createFromSVG (*svg);

Expand Down

0 comments on commit 6bdcab8

Please sign in to comment.