MCPcopy
hub / github.com/chartjs/Chart.js / clipArea

Function clipArea

src/helpers/helpers.canvas.ts:328–333  ·  view source on GitHub ↗
(ctx: CanvasRenderingContext2D, area: TRBL)

Source from the content-addressed store, hash-verified

326}
327
328export function clipArea(ctx: CanvasRenderingContext2D, area: TRBL) {
329 ctx.save();
330 ctx.beginPath();
331 ctx.rect(area.left, area.top, area.right - area.left, area.bottom - area.top);
332 ctx.clip();
333}
334
335export function unclipArea(ctx: CanvasRenderingContext2D) {
336 ctx.restore();

Callers 4

_drawDatasetMethod · 0.85
drawLabelsMethod · 0.85
drawMethod · 0.85
_drawfillFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected