Apply an SVG Widget as a single object in a stack to multiple buttons as icon?
Richmond
richmondmathewson at gmail.com
Sun Jun 19 03:15:04 EDT 2016
Well: Let's start at the beginning (Yes, I know; that's oozing with
originality; sorry.):
1. How does one import an SVG image in the IDE?
[By that I don't mean "fekking around" extracting path data and so on].
2. I popped the 'black star' SVG thingy on a stack and tried to set a
button up so
it had that SVG as an icon . . . like this:
The SVG had an ide assigned of 1003
The prefs palette would not allow me to set the button's icon to 1003.
3. Is it just me, or is the 'thing' with SVG images still in a sort of
alpha-beta state?
--------------------------------------
4. I thought I'd try a "different way", and to test that I imported a
PNG image
called "INKKY.png" [don't ask] and executed this in the MessageBox:
set the icon of btn "BT" to the id of img "INKY" . . . and,
unsurprisingly it worked.
So:
5. set the icon of btn "BT" to the id of widget "SVG icon" . . . Humph:
obviously expecting a bit much.
-------------------------------
There are 2 questions that I can think of just now:
6. Why bother with using an SVG image as an icon when it's dead easy to
convert it into a PNG
image using any number of image processors, and then importing that into
one's stack?
6.5. [possible answer] Because if one sets one's stack up to scale to an
end-user's monitor a PNG
might get jaggy round the edges.
7. When (?) are we going to be able to go /Menu/File/Import as
Control/Image File...
and an SVG file will be imported just the same as a GIF, JPG, PNG or one
of those funny image formats nobody has heard of?
Richmond.
On 19.06.2016 08:03, Richard Gaskin wrote:
> Sannyasin Brahmanathaswami wrote:
>
> > With images we can import a raster "object" and then set the icon
> > of a button to that image.
> >
> > Wouldn't it be nice to be able to do the same with a SVG file?
>
> We can't?
>
> What's the point of an SGV Icon object if it can't be used as an icon?
>
More information about the use-livecode
mailing list