SPDX-License-Identifier: GPL-2.0-or-later
NOTE! This copyright does *not* cover user models that use these Nasal
services by normal function calls - this is merely considered normal use
of the code, and does *not* fall under the heading of "derived work."
-------------------------------------------------------------------------------
svgcanvas.nas - base class to populate canvas from SVG and animate elements
author: jsb
created: 06/2020
-------------------------------------------------------------------------------
Examples:
var myCanvas = SVGCanvas.new("mySVG");
myCanvas.loadsvg("myfile.svg", ["foo", "bar"]);
to hide/show a SVG element based on a property you can use:
var L = setlistener("/controls/foo", myCanvas._makeListener_showHide("foo"));
to animate a SVG element you can use:
myCanvas["bar"].setTranslation(10,20);
-------------------------------------------------------------------------------