files/en-us/web/api/paintrenderingcontext2d/index.md
{{APIRef("CSS Painting API")}}
The PaintRenderingContext2D interface of the CSS Painting API is the API's rendering context for drawing to the bitmap. It implements a subset of the {{domxref("CanvasRenderingContext2D")}} API, with the following exceptions:
CanvasImageData pixel manipulation, CanvasUserInterface focus, CanvasText text drawing, or CanvasTextDrawingStyles text style interface methods.currentColor, when used as a color, is treated as opaque black.The interface is only available in {{domxref("PaintWorkletGlobalScope")}}.
The PaintRenderingContext2D implements a subset of the {{domxref("CanvasRenderingContext2D")}} API, with all properties and methods having the same usage as in CanvasRenderingContext2D
true if the rendering context was lost.restore().save().transform() method with the same arguments.globalAlpha applied, this sets how shapes and images are drawn onto the existing bitmap.true if the specified point is contained in the current or specified path.true if the point is inside the area contained by the stroking of a pathbutt (default), round, square.round, bevel, miter (default).Array of numbers that specify the lengths of the alternative lines and gaps in coordinate space units.See full examples at CSS Painting API.
{{Specifications}}
{{Compat}}