ZIM Docs - SVG() for #HTML #Canvas #JavaScript, #CreateJS, #ZIMjs
Channel: ZIM LEARN
Date: 10/05/2022

new SVG() is how we can view an SVG file on the canvas with ZIM at https://zimjs.com - although, we often just use ZIM Blob and Squiggle objects which have many advantages - see the docs for a list of these at https://zimjs.com/docs.html?item=SVG.

There are two main SVG options: bitmap:true (default) - which loads the SVG as a very scalable Bitmap (this was svgToBitmap()) and bitmap:false - which loads the SVG as an SVGContainer().  We used to use asset() to load images, sound, JSON, SVG, etc. but in ZIM version ZIM 00 we split asset() up into the Pic(), Aud(), SVG() wrapper classes. See Docs at https://zimjs.com/docs.html?item=SVG.