Canvas

Canvas is a widget which allows drawing on it using a canvas context. Canvas context is a subset of the HTML5 CanvasRenderingContext2D. Includes Composite

Methods

getContext(contextType, width, height)

Parameters:

  • contextType: string, this must be "2d"
  • width: number
  • height: number

Returns: CanvasContext

Returns the drawing context.

See also