Index
$#! · 0-9 · A · B · C · D · E · F · G · H · I · J · K · L · M · N · O · P · Q · R · S · T · U · V · W · X · Y · Z
A
 addToSelection
C
 clear
 clearSelection
 createLayer
D
 deleteCurrentLayer
F
 Fill and Stroke
G
 getCurrentLayer
 getLayer
 getLayerOpacity
 getLayerVisibility
 getNumLayers
 getSvgString
L
 Layers
M
 moveSelectedToLayer
O
 open
R
 removeFromSelection
 renameCurrentLayer
S
 save
 Selection
 Serialization
 setCurrentLayer
 setCurrentLayerPosition
 setLayerOpacity
 setLayerVisibility
 setSvgString
 svgcanvas.js
this.addToSelection = function(elemsToAdd,
showGrips)
Adds a list of elements to the selection.
this.clear = function()
Clears the current document.
this.clearSelection = function()
Clears the selection.
this.createLayer = function(name)
Creates a new top-level layer in the drawing with the given name, sets the current layer to it, and then clears the selection This function then calls the ‘changed’ handler.
this.deleteCurrentLayer = function()
Deletes the current layer from the drawing and then clears the selection.
this.getCurrentLayer = function()
Returns the name of the currently selected layer.
this.getLayer = function(i)
Returns the name of the ith layer.
this.getLayerOpacity = function(layername)
Returns the opacity of the given layer.
this.getLayerVisibility = function(layername)
Returns whether the layer is visible.
this.getNumLayers = function()
Returns the number of layers in the current drawing.
this.getSvgString = function()
Returns the current drawing as raw SVG XML text.
this.moveSelectedToLayer = function(layername)
Moves the selected elements to layername.
this.open = function(str)
Calls the ‘opened’ handler and sends the SVG XML text.
this.removeFromSelection = function(elemsToRemove)
Removes elements from the selection.
this.renameCurrentLayer = function(newname)
Renames the current layer.
this.save = function()
Serializes the current drawing into SVG XML text and returns it to the ‘saved’ handler.
this.setCurrentLayer = function(name)
Sets the current layer.
this.setCurrentLayerPosition = function(newpos)
Changes the position of the current layer to the new value.
this.setLayerOpacity = function(layername,
opacity)
Sets the opacity of the given layer.
this.setLayerVisibility = function(layername,
bVisible)
Sets the visibility of the layer.
this.setSvgString = function(xmlString)
This function sets the current drawing as the input SVG XML.
Close