Namespace: CanvasRenderingContext2D

CanvasRenderingContext2D

2D rendering context for the Canvas API

See:

Methods


roundRect(x, y, width, height, radius)

Draws a rounded rectangle using the current state of the canvas. Draw a rectangle if the radius is null.

Parameters:
Name Type Description
x Number

The top left x coordinate

y Number

The top left y coordinate

width Number

The width of the rectangle

height Number

The height of the rectangle

radius Number

The corner radius.


textPath(text, path)

CanvasRenderingContext2D: draw text along path

Parameters:
Name Type Description
text string
path Array.<Number>