This the graphics rendering bridge for W3C Canvas compliant browsers. Since Canvas is an immediate mode graphics api, with no object graph or eventing capabilities, use of this module alone will only add in drawing support. The additional module, canvasWithEvents extends this module with additional support for handling events on Canvas. By default, the support for events is now included however, if only drawing capabilities are needed, canvas event module can be disabled using the dojoConfig option, canvasEvents:true|false. The id of the Canvas renderer is 'canvas'. This id can be used when switch Dojo's graphics context between renderer implementations. See dojox/gfx/_base.switchRenderer API.
See the dojox/gfx/canvas reference documentation for more information.
creates a surface (Canvas)
Parameter | Type | Description |
---|---|---|
parentNode | Node | a parent node |
width | String | width of surface, e.g., "100px" |
height | String | height of surface, e.g., "100px" |
Parameter | Type | Description |
---|---|---|
event | undefined | |
gfxElement | undefined |