I want to draw a bypass button with a PNG/SVG image in a juce::ImageButton with a size of about 24px (width and height). Unfortunately, it currently looks very pixelated:
Since I created the texture myself in an SVG image editor, I can easily change the texture size and export it to any format.
What are the best settings to display such an image without it looking pixelated? Should I export the texture at the same size I want in the plugin (24px) or at a larger size (e.g., 4x as large)? What format should I use? Are there any filters I can apply to make it more detailed?
Since a SVG file is basically a XML file, you can read the XML file as a string and pass it to a function that would extract and resize the path contained into it, something like this:
You could write your own class that inherits from ToggleButton and override the paint() function where you paint your path, maybe change its color according to toggleState, etc.