svgcanvas.js | |
Functions | |
save | Serializes the current drawing into SVG XML text and returns it to the ‘saved’ handler. |
getSvgString | Returns the current drawing as raw SVG XML text. |
setSvgString | This function sets the current drawing as the input SVG XML. |
createLayer | This function clears the selection and then creates a new top-level layer in the drawing with the given name and sets the current layer to it. |
deleteCurrentLayer | This function clears the selection and then deletes the current layer from the drawing. |
getNumLayers | This function returns the number of layers in the current drawing. |
Serializes the current drawing into SVG XML text and returns it to the ‘saved’ handler.
this.save = function()
Returns the current drawing as raw SVG XML text.
this.getSvgString = function()
This function sets the current drawing as the input SVG XML.
this.setSvgString = function( xmlString )
This function clears the selection and then creates a new top-level layer in the drawing with the given name and sets the current layer to it.
this.createLayer = function( name )
This function clears the selection and then deletes the current layer from the drawing.
this.deleteCurrentLayer = function()
This function returns the number of layers in the current drawing.
this.getNumLayers = function()