diff --git a/api/LiterallyCanvas.rst b/api/LiterallyCanvas.rst index 0dc3587..c83d213 100644 --- a/api/LiterallyCanvas.rst +++ b/api/LiterallyCanvas.rst @@ -184,4 +184,18 @@ Getting information .. js:function:: getPixel(x, y) - Get the color of the given drawing-space pixel as a CSS color string. \ No newline at end of file + Get the color of the given drawing-space pixel as a CSS color string. + +Setting the tool +^^^^^^^^^^^^^^^^ + +.. js:function:: setTool(toolInstance) + + Sets the current tool to `toolInstance`, which should be an instance of an + `LC.tools.Tool` subclass. + + For example: + + .. code-block:: javascript + + lc.setTool(new LC.tools.Eraser())