Waveform Icons
-
Sorry for what may be a stupid question, but how do you convert a SVG file to Base64?
-
@Shelest theres a conversion tool in the HISE tools menu
-
@Morphoice Thank you very much! This was the greatest example of carelessness on my part. I didn't even think to look for it inside HISE. And I didn't find any adequate external tools.
-
@Shelest said in Waveform Icons:
I didn't find any adequate external tools
There's also one included in Projucer
-
There's also one included in Projucer
Thanks a lot David, I'll take a look.
-
@Shelest said in Waveform Icons:
Thanks a lot David, I'll take a look.
Na use the one in HISE, it's better.
-
@d-healey OK, thank you!
-
@d-healey what sort of data is this anyways? it looks like Base64 but that shouldn't have dots in them should it? doesnt register as valid Base64. I wonder how to convert it back, should someone want to make changes to the color etc. It didn't work without the color info
-
@Morphoice Says Base64 Path, not sure of the details. I don't think colour information is included, you'd assign the colour within your paint routine/laf.
-
@d-healey in my case the svg was set to white, it wouldnt take color from the paint routine, it still always came out white
-
@Morphoice said in Waveform Icons:
in my case the svg was set to white, it wouldnt take color from the paint routine, it still always came out white
Show me your code
-
@d-healey it's all there in the first post, no more to it
-
@Morphoice I don't see anywhere in that code where you're setting a color though
-
@d-healey I didn't because it wasn't changing the color, so i removed it. It was really just the example from the docs
-
@Morphoice Oh interesting, I just realised you're using
g.drawSVG
. I've never used that function I always usedrawPath
orfillPath
, which take the colour. But it seemsdrawSVG
doesn't. -
@d-healey I assume the path information is the same? I remember during conversion that sometimes the tool needs only the path info, sometimes it takes the complete svg... I really can't tell when it works and when it doesn't I was just glad it went well with the icons. non-connected paths or things with multiple paths sometimes break. I had a logo once where all letters worked fine, one just wouldnt
-
@Morphoice said in Waveform Icons:
I assume the path information is the same
Not necessarily. I just tried it with your sine icon and it doesn't work.
-
@d-healey
g.drawSVG
takes the colour inside the SVG and cannot be overwritten (what a pity...) -
@ustk said in Waveform Icons:
(what a pity...)
That's probably a good thing, no? Does it work with multi-colour SVGs?
-
@ustk makes sense. however, I can supply the SVG markup if someone needs to make changes to the color, I'll append it to the post later