HelpPath{Create}CommandName{createCanvas}ReturnValue{int handle=}OpenBrace{(}Parameters{int x, int y, int width, int height, handle parent}CloseBrace{)}Description{Creates a canvas.  Canvases are effectively blank drawing boards which you can draw on using the various drawing commands (drawLine, drawRect, drawEllipse and drawPoint).  They have many uses, such as custom controls, or a painting surface in an image editor.}ReturnDescription{Handle to the new gadget.}Param1{x}Param1Desc{X position of new gadget}Param2{y}Param2Desc{Y position of new gadget}Param3{width}Param3Desc{Width of new gadget in pixels}Param4{height}Param4Desc{Height of new gadget in pixels}Param5{}Param5Desc{}Param6{}Param6Desc{}Remarks{You do not have to continually repaint canvases like you would with the normal 2D commands (dot, point, line).  You only need to call the drawing commands when you wish to show a visual change in the appearence of the canvas.
<br><br>
Use the setDrawingColor command to set the colour used by the drawing commands.
<br><br>
At the time of writing, canvas gadget drawing is much faster than using the ordinary 2D commands, so they may be useful as replacements.  setDrawingColor in particular may be done frequently unlike the INK command.<br>
However, resizing a canvas is a slow operation as the plugin has to recreate all of its internal memory buffers.  Also for this reason, a gadget is wiped clean when you resize it.}Param7{parent}Param7Desc{Handle to the parent of the new gadget, or 0 for the main window}ExampleSource{}SeeAlso{}