(ctx: CanvasRenderingContext2D, line: LineElement, start?: number, count?: number)
| 217 | } |
| 218 | |
| 219 | function strokePathWithCache(ctx: CanvasRenderingContext2D, line: LineElement, start?: number, count?: number) { |
| 220 | let path = line._path; |
| 221 | if (!path) { |
| 222 | path = line._path = new Path2D(); |
| 223 | if (line.path(path, start, count)) { |
| 224 | path.closePath(); |
| 225 | } |
| 226 | } |
| 227 | setStyle(ctx, line.options); |
| 228 | ctx.stroke(path); |
| 229 | } |
| 230 | |
| 231 | function strokePathDirect(ctx: CanvasRenderingContext2D, line: LineElement, start?: number, count?: number) { |
| 232 | const {segments, options} = line; |