diff --git a/docs/files/svgcanvas-js.html b/docs/files/svgcanvas-js.html index 8f5f90a4..a6375c28 100644 --- a/docs/files/svgcanvas-js.html +++ b/docs/files/svgcanvas-js.html @@ -11,7 +11,7 @@ if (browserType) {document.write("
| svgcanvas.js | |
| Selection | |
| clearSelection | Clears the selection. |
| addToSelection | Adds a list of elements to the selection. |
| removeFromSelection | Removes elements from the selection. |
| Serialization | |
| open | Calls the ‘opened’ handler and sends the SVG XML text. |
| 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. |
| Layers | |
| createLayer | 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. |
| deleteCurrentLayer | Deletes the current layer from the drawing and then clears the selection. |
| getNumLayers | Returns the number of layers in the current drawing. |
| getLayer | Returns the name of the ith layer. |
| getCurrentLayer | Returns the name of the currently selected layer. |
| setCurrentLayer | Sets the current layer. |
| renameCurrentLayer | Renames the current layer. |
| setCurrentLayerPosition | Changes the position of the current layer to the new value. |
| getLayerVisibility | Returns whether the layer is visible. |
| setLayerVisibility | Sets the visibility of the layer. |
| moveSelectedToLayer | Moves the selected elements to layername. |
| clear | Clears the current document. |
| svgcanvas.js | |
| Selection | |
| clearSelection | Clears the selection. |
| addToSelection | Adds a list of elements to the selection. |
| removeFromSelection | Removes elements from the selection. |
| Serialization | |
| open | Calls the ‘opened’ handler and sends the SVG XML text. |
| 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. |
| Layers | |
| createLayer | 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. |
| deleteCurrentLayer | Deletes the current layer from the drawing and then clears the selection. |
| getNumLayers | Returns the number of layers in the current drawing. |
| getLayer | Returns the name of the ith layer. |
| getCurrentLayer | Returns the name of the currently selected layer. |
| setCurrentLayer | Sets the current layer. |
| renameCurrentLayer | Renames the current layer. |
| setCurrentLayerPosition | Changes the position of the current layer to the new value. |
| getLayerVisibility | Returns whether the layer is visible. |
| setLayerVisibility | Sets the visibility of the layer. |
| moveSelectedToLayer | Moves the selected elements to layername. |
| getLayerOpacity | Returns the opacity of the given layer. |
| setLayerOpacity | Sets the opacity of the given layer. |
| clear | Clears the current document. |
| Fill and Stroke |
this.moveSelectedToLayer = function( layername )
Moves the selected elements to layername. If the name is not a valid layer name, then false is returned. Otherwise it returns true. This is an undo-able action.
| layername | the name of the layer you want to which you want to move the selected elements |
true if the selected elements were moved to the layer, false otherwise.
this.getLayerOpacity = function( layername )
Returns the opacity of the given layer. If the input name is not a layer, null is returned.
| layername | name of the layer on which to get the opacity |
The opacity value of the given layer. This will be a value between 0.0 and 1.0, or null if layername is not a valid layer
this.setLayerOpacity = function( layername, opacity )
Sets the opacity of the given layer. If the input name is not a layer, nothing happens. This is not an undo-able action. NOTE: this function exists solely to apply a highlighting/de-emphasis effect to a layer, when it is possible for a user to affect the opacity of a layer, we will need to allow this function to produce an undo-able action. If opacity is not a value between 0.0 and 1.0, then nothing happens.
| layername | name of the layer on which to set the opacity |
| opacity | a float value in the range 0.0-1.0 |
Clears the selection.
this.clearSelection = function()
Adds a list of elements to the selection.
this.addToSelection = function( elemsToAdd, showGrips )
Removes elements from the selection.
this.removeFromSelection = function( elemsToRemove )
Calls the ‘opened’ handler and sends the SVG XML text.
this.open = function( str )
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 )
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.createLayer = function( name )
Deletes the current layer from the drawing and then clears the selection.
this.deleteCurrentLayer = function()
Returns the number of layers in the current drawing.
this.getNumLayers = function()
Returns the name of the ith layer.
this.getLayer = function( i )
Returns the name of the currently selected layer.
this.getCurrentLayer = function()
Sets the current layer.
this.setCurrentLayer = function( name )
Renames the current layer.
this.renameCurrentLayer = function( newname )
Changes the position of the current layer to the new value.
this.setCurrentLayerPosition = function( newpos )
Returns whether the layer is visible.
this.getLayerVisibility = function( layername )
Sets the visibility of the layer.
this.setLayerVisibility = function( layername, bVisible )
Moves the selected elements to layername.
this.moveSelectedToLayer = function( layername )
Clears the current document.
this.clear = function()
Clears the selection.
this.clearSelection = function()
Adds a list of elements to the selection.
this.addToSelection = function( elemsToAdd, showGrips )
Removes elements from the selection.
this.removeFromSelection = function( elemsToRemove )
Calls the ‘opened’ handler and sends the SVG XML text.
this.open = function( str )
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 )
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.createLayer = function( name )
Deletes the current layer from the drawing and then clears the selection.
this.deleteCurrentLayer = function()
Returns the number of layers in the current drawing.
this.getNumLayers = function()
Returns the name of the ith layer.
this.getLayer = function( i )
Returns the name of the currently selected layer.
this.getCurrentLayer = function()
Sets the current layer.
this.setCurrentLayer = function( name )
Renames the current layer.
this.renameCurrentLayer = function( newname )
Changes the position of the current layer to the new value.
this.setCurrentLayerPosition = function( newpos )
Returns whether the layer is visible.
this.getLayerVisibility = function( layername )
Sets the visibility of the layer.
this.setLayerVisibility = function( layername, bVisible )
Moves the selected elements to layername.
this.moveSelectedToLayer = function( layername )
Returns the opacity of the given layer.
this.getLayerOpacity = function( layername )
Sets the opacity of the given layer.
this.setLayerOpacity = function( layername, opacity )
Clears the current document.
this.clear = function()
Adds a list of elements to the selection.
this.addToSelection = function( elemsToAdd, showGrips )
Returns the name of the currently selected layer.
this.getCurrentLayer = function()
Returns the name of the ith layer.
this.getLayer = function( i )
Returns whether the layer is visible.
this.getLayerVisibility = function( layername )
Returns the number of layers in the current drawing.
this.getNumLayers = function()
Returns the current drawing as raw SVG XML text.
this.getSvgString = function()
Returns the name of the currently selected layer.
this.getCurrentLayer = function()
Returns the name of the ith layer.
this.getLayer = function( i )
Returns the opacity of the given layer.
this.getLayerOpacity = function( layername )
Returns whether the layer is visible.
this.getLayerVisibility = function( layername )
Returns the number of layers in the current drawing.
this.getNumLayers = function()
Returns the current drawing as raw SVG XML text.
this.getSvgString = function()
Moves the selected elements to layername.
this.moveSelectedToLayer = function( layername )
Moves the selected elements to layername.
this.moveSelectedToLayer = function( layername )
Calls the ‘opened’ handler and sends the SVG XML text.
this.open = function( str )
Calls the ‘opened’ handler and sends the SVG XML text.
this.open = function( str )
Removes elements from the selection.
this.removeFromSelection = function( elemsToRemove )
Renames the current layer.
this.renameCurrentLayer = function( newname )
Removes elements from the selection.
this.removeFromSelection = function( elemsToRemove )
Renames the current layer.
this.renameCurrentLayer = function( newname )
Serializes the current drawing into SVG XML text and returns it to the ‘saved’ handler.
this.save = function()
Sets the current layer.
this.setCurrentLayer = function( name )
Changes the position of the current layer to the new value.
this.setCurrentLayerPosition = function( newpos )
Sets the visibility of the layer.
this.setLayerVisibility = function( layername, bVisible )
This function sets the current drawing as the input SVG XML.
this.setSvgString = function( xmlString )
Serializes the current drawing into SVG XML text and returns it to the ‘saved’ handler.
this.save = function()
Sets the current layer.
this.setCurrentLayer = function( name )
Changes the position of the current layer to the new value.
this.setCurrentLayerPosition = function( newpos )
Sets the opacity of the given layer.
this.setLayerOpacity = function( layername, opacity )
Sets the visibility of the layer.
this.setLayerVisibility = function( layername, bVisible )
This function sets the current drawing as the input SVG XML.
this.setSvgString = function( xmlString )
Adds a list of elements to the selection.
this.addToSelection = function( elemsToAdd, showGrips )
Returns the name of the currently selected layer.
this.getCurrentLayer = function()
Returns the name of the ith layer.
this.getLayer = function( i )
Returns whether the layer is visible.
this.getLayerVisibility = function( layername )
Returns the number of layers in the current drawing.
this.getNumLayers = function()
Returns the current drawing as raw SVG XML text.
this.getSvgString = function()
Returns the name of the currently selected layer.
this.getCurrentLayer = function()
Returns the name of the ith layer.
this.getLayer = function( i )
Returns the opacity of the given layer.
this.getLayerOpacity = function( layername )
Returns whether the layer is visible.
this.getLayerVisibility = function( layername )
Returns the number of layers in the current drawing.
this.getNumLayers = function()
Returns the current drawing as raw SVG XML text.
this.getSvgString = function()
Moves the selected elements to layername.
this.moveSelectedToLayer = function( layername )
Moves the selected elements to layername.
this.moveSelectedToLayer = function( layername )
Calls the ‘opened’ handler and sends the SVG XML text.
this.open = function( str )
Calls the ‘opened’ handler and sends the SVG XML text.
this.open = function( str )
Removes elements from the selection.
this.removeFromSelection = function( elemsToRemove )
Renames the current layer.
this.renameCurrentLayer = function( newname )
Removes elements from the selection.
this.removeFromSelection = function( elemsToRemove )
Renames the current layer.
this.renameCurrentLayer = function( newname )
Serializes the current drawing into SVG XML text and returns it to the ‘saved’ handler.
this.save = function()
Sets the current layer.
this.setCurrentLayer = function( name )
Changes the position of the current layer to the new value.
this.setCurrentLayerPosition = function( newpos )
Sets the visibility of the layer.
this.setLayerVisibility = function( layername, bVisible )
This function sets the current drawing as the input SVG XML.
this.setSvgString = function( xmlString )
Serializes the current drawing into SVG XML text and returns it to the ‘saved’ handler.
this.save = function()
Sets the current layer.
this.setCurrentLayer = function( name )
Changes the position of the current layer to the new value.
this.setCurrentLayerPosition = function( newpos )
Sets the opacity of the given layer.
this.setLayerOpacity = function( layername, opacity )
Sets the visibility of the layer.
this.setLayerVisibility = function( layername, bVisible )
This function sets the current drawing as the input SVG XML.
this.setSvgString = function( xmlString )