MCPcopy Create free account
hub / github.com/chartjs/Chart.js / strokePathWithCache

Function strokePathWithCache

src/elements/element.line.js:207–217  ·  view source on GitHub ↗
(ctx, line, start, count)

Source from the content-addressed store, hash-verified

205}
206
207function strokePathWithCache(ctx, line, start, count) {
208 let path = line._path;
209 if (!path) {
210 path = line._path = new Path2D();
211 if (line.path(path, start, count)) {
212 path.closePath();
213 }
214 }
215 setStyle(ctx, line.options);
216 ctx.stroke(path);
217}
218
219function strokePathDirect(ctx, line, start, count) {
220 const {segments, options} = line;

Callers 1

drawFunction · 0.85

Calls 2

setStyleFunction · 0.85
pathMethod · 0.65

Tested by

no test coverage detected