The coming of SVG
Mark Waddingham
mark at livecode.com
Sat Nov 11 05:15:20 EST 2017
On 2017-11-10 18:50, David Bovill via use-livecode wrote:
> I don't think this would help (below). What is nice is to be able to
> use
> professional illustration tools, and then add hypertext links to one of
> the
> objects in the svg with built in tools - for instance using Graphic, or
> OmniGraphl). That way you can create complex beautiful (and scaleable)
> interface elements working with artists. Later you can also use
> javascript
> to dynamically alter the links by referencing the node in SVG - again
> working with externally created SVG. I don't see how to do these things
> if
> it is not possible to support events / links as per the TinySVG spec?
>
> - https://www.w3.org/TR/SVGTiny12/linking.html
> - https://www.w3.org/wiki/SVG_Links
Elements of interactivity and animation have been on my mind with
regards SVG - indeed, we can get very far with the pre-compilation
approach that we are currently taking. For interaction to work it will
be necessary to annotate the SVG file to explain which elements you want
to receive event notifications for, and which SVG attributes/properties
you want to be able to manipulate at runtime. For animation, it requires
grokking and processing the SMIL elements/attributes which the full SVG
Tiny spec defines.
I must confess I hadn't yet worked out how those annotations might be
applied from an illustration tool - but you've just given me that
missing piece :)
Kinda obvious now, but we can use hyperlinks on the SVG elements, which
such tools do allow you to set - so no post-processing of the SVG by a
human would be required.
So, I have an idea/plan on how to do this - so it is a case of when and
not if.
The only bit this would not allow would be the ability to
add/move/remove elements from the tree, or set attributes/properties
which are structural (e.g. gradients can inherit from other gradients in
SVG 1.1). However, that is not necessarily too much of a blocker here -
as you can have all the elements you need present in the tree at the
point of creation, and just control their display by the visibility
attribute.
To get full interactivity like you get in browsers would require
implementing a dynamic SVG canvas - which sounds like an interesting and
useful path for the previously mentioned 'canvas' control idea...
Warmest Regards,
Mark.
--
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps
More information about the use-livecode
mailing list