SVG icons in buttons

Sannyasin Brahmanathaswami brahma at hindu.org
Wed Feb 27 09:57:33 EST 2019


I am a little late to the SVG Party....what do you mean: 

    "Admittedly you do need to compile your SVG to the drawing format so you 
    can use them in images,"

??

To state the obvious: Currently, I  have to "expose" a new SVG widget every time it make it a button. In theory, if SVG can be images, you could just have one instance and assign it the icon of many buttons on different stacks. Where you store image resources on the main engine stack/hide it, but the  ID's are always available. I do this for PNGs, because I need to graphic effects to work in some buttons (shadow, outglow) though I just discovered that if you group the widget, by itself, in does accept the graphic effects. But seems like we are working to hard. A one SVG image/with shadow and outglow with a single ID would be great? (assign as an icon for button is multiple "Views" )

Brahmanathaswami
 
Mark Waddingham wrote:

    Admittedly you do need to compile your SVG to the drawing format so you 
    can use them in images, but then previously you needed to re-rasterize 
    images at various densities anyway to make your apps look as good as 
    possible. (However, both of these are entirely scriptable - e.g. in the 
    standalone build start handler - or by executing a suitably crafted 
    handler in your stack from the message box).



More information about the Use-livecode mailing list