External: CanvasRenderingContext2D


The built-in 2D rendering context for the drawing surface of a external:canvas.



<static> CanvasRenderingContext2D#dashedLineTo()

Dashed line polyfill for the canvas. Note that dashed lines are expensive operations when not supported natively! @see CanvasRenderingContext2D.stxLine

<static> CanvasRenderingContext2D#stxCircle(x, y, radius, filled)

Add native circle drawing to the canvas

Name Type Description
x number

X position of center of circle

y number

Y position of center of circle

radius number

Radius of circle

filled boolean

If true then circle will be filled

<static> CanvasRenderingContext2D#stxLine()

Convenience function for rendering lines of various types on the canvas. Pattern should be an array that contains the number of pixels on and then the number of pixels off. For instance [1,1] would create a dotted pattern by turning one pixel on and then one pixel off repeatedly.