Adds an arc to the path which is centered at (x, y) position with radius r starting at startAngle and ending at endAngle going in the given direction by anticlockwise (defaulting to clockwise).
Adds an arc to the path which is centered at (x, y) position with radius r starting at startAngle and ending at endAngle going in the given direction by anticlockwise (defaulting to clockwise).
MDN
Adds an arc with the given control points and radius, connected to the previous point by a straight line.
Adds an arc with the given control points and radius, connected to the previous point by a straight line.
MDN
Starts a new path by resetting the list of sub-paths.
Starts a new path by resetting the list of sub-paths. Call this method when you want to create a new path.
MDN
Back-reference to the canvas element for which this context was created.
Back-reference to the canvas element for which this context was created. Read only.
MDN
Sets all pixels in the rectangle defined by starting point (x, y) and size (width, height) to transparent black.
Sets all pixels in the rectangle defined by starting point (x, y) and size (width, height) to transparent black.
MDN
Creates a clipping path from the current sub-paths.
Creates a clipping path from the current sub-paths. Everything drawn after clip() is called appears inside the clipping path only. For an example, see Clipping paths in the Canvas tutorial.
MDN
Tries to draw a straight line from the current point to the start.
Tries to draw a straight line from the current point to the start. If the shape has already been closed or has only one point, this function does nothing.
MDN
Creates a new, blank ImageData object with the specified dimensions.
Creates a new, blank ImageData object with the specified dimensions. All of the pixels in the new object are transparent black.
MDN
Draws the specified image.
Draws the specified image. This method is available in multiple formats, providing a great deal of flexibility in its use.
MDN
Fills the subpaths with the current fill style.
Fills the subpaths with the current fill style.
MDN
Draws a filled rectangle at (x, y) position whose size is determined by width and height.
Draws a filled rectangle at (x, y) position whose size is determined by width and height.
MDN
A CSS color, a CanvasGradient or CanvasPattern, to use as a fill.
Default value 10px sans-serif
Default value 10px sans-serif
MDN
Returns an ImageData object representing the underlying pixel data for the area of the canvas denoted by the rectangle which starts at (sx, sy) and has an sw width and sh height.
Returns an ImageData object representing the underlying pixel data for the area of the canvas denoted by the rectangle which starts at (sx, sy) and has an sw width and sh height.
MDN
Returns a dash list array containing an even number of non-negative numbers.
Returns a dash list array containing an even number of non-negative numbers.
MDN
Alpha value that is applied to shapes and images before they are composited onto the canvas.
Alpha value that is applied to shapes and images before they are composited onto the canvas. Default 1.0 (opaque).
MDN
With globalAlpha applied this sets how shapes and images are drawn onto the existing bitmap.
With globalAlpha applied this sets how shapes and images are drawn onto the existing bitmap. Possible values: source-atop source-in source-out source-over (default) destination-atop destination-in destination-out destination-over lighter darker copy xor
MDN
Reports whether or not the specified point is contained in the current path.
Reports whether or not the specified point is contained in the current path.
MDN
Type of endings on the end of lines.
Type of endings on the end of lines. Possible values: butt (default), round, square
MDN
Specifies where to start a dasharray on a line.
Specifies where to start a dasharray on a line.
MDN
Defines the type of corners where two lines meet.
Defines the type of corners where two lines meet. Possible values: round, bevel, miter (default)
MDN
Connects the last point in the subpath to the x, y coordinates with a straight line.
Connects the last point in the subpath to the x, y coordinates with a straight line.
MDN
Width of lines.
Width of lines. Default 1.0
MDN
Default 10
Default 10
MDN
Moves the starting point of a new subpath to the (x, y) coordinates.
Moves the starting point of a new subpath to the (x, y) coordinates.
MDN
Restores the drawing style state to the last element on the 'state stack' saved by save().
Restores the drawing style state to the last element on the 'state stack' saved by save().
MDN
Saves the current drawing style state using a stack so you can revert any change you make to it using restore().
Saves the current drawing style state using a stack so you can revert any change you make to it using restore().
MDN
Specifies the blurring effect.
Specifies the blurring effect. Default 0
MDN
Color of the shadow.
Color of the shadow. Default fully-transparent black.
MDN
Horizontal distance the shadow will be offset.
Horizontal distance the shadow will be offset. Default 0.
MDN
Vertical distance the shadow will be offset.
Vertical distance the shadow will be offset. Default 0.
MDN
Strokes the subpaths with the current stroke style.
Strokes the subpaths with the current stroke style.
MDN
Paints a rectangle which has a starting point at (x, y) and has a w width and an h height onto the canvas, using the current stroke style.
Paints a rectangle which has a starting point at (x, y) and has a w width and an h height onto the canvas, using the current stroke style.
MDN
A CSS color, a CanvasGradient or CanvasPattern, to use as a line around shapes.
Possible values: start (default), end, left, right or center.
Possible values: start (default), end, left, right or center.
MDN
Possible values: top, hanging, middle, alphabetic (default), ideographic, bottom
Possible values: top, hanging, middle, alphabetic (default), ideographic, bottom
MDN
Moves the origin point of the context to (x, y).
Moves the origin point of the context to (x, y).
MDN
The 2D rendering context for the drawing surface of a <canvas> element. To get this object, call getContext() on a <canvas>, supplying "2d" as the argument:
MDN