(ctx, line, start, count)
| 205 | } |
| 206 | |
| 207 | function 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 | |
| 219 | function strokePathDirect(ctx, line, start, count) { |
| 220 | const {segments, options} = line; |