* Append all segments of this line to current path. * @param {CanvasRenderingContext2D|Path2D} ctx * @param {number} [start] * @param {number} [count] * @returns {undefined|boolean} - true if line is a full loop (path should be closed)
(ctx, start, count)
| 404 | * @returns {undefined|boolean} - true if line is a full loop (path should be closed) |
| 405 | */ |
| 406 | path(ctx, start, count) { |
| 407 | const segments = this.segments; |
| 408 | const segmentMethod = _getSegmentMethod(this); |
| 409 | let loop = this._loop; |
| 410 | |
| 411 | start = start || 0; |
| 412 | count = count || (this.points.length - start); |
| 413 | |
| 414 | for (const segment of segments) { |
| 415 | loop &= segmentMethod(ctx, this, segment, {start, end: start + count - 1}); |
| 416 | } |
| 417 | return !!loop; |
| 418 | } |
| 419 | |
| 420 | /** |
| 421 | * Draw |
nothing calls this directly
no test coverage detected