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

Function strokePathDirect

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

Source from the content-addressed store, hash-verified

217}
218
219function strokePathDirect(ctx, line, start, count) {
220 const {segments, options} = line;
221 const segmentMethod = _getSegmentMethod(line);
222
223 for (const segment of segments) {
224 setStyle(ctx, options, segment.style);
225 ctx.beginPath();
226 if (segmentMethod(ctx, line, segment, {start, end: start + count - 1})) {
227 ctx.closePath();
228 }
229 ctx.stroke();
230 }
231}
232
233const usePath2D = typeof Path2D === 'function';
234

Callers 1

drawFunction · 0.85

Calls 2

_getSegmentMethodFunction · 0.85
setStyleFunction · 0.85

Tested by

no test coverage detected