| 48 | // The canvas helpers take a CanvasRenderingContext2D, but the line also draws into a Path2D |
| 49 | // eslint-disable-next-line @typescript-eslint/no-explicit-any |
| 50 | function getLineMethod(options: AnyObject): any { |
| 51 | if (options.stepped) { |
| 52 | return _steppedLineTo; |
| 53 | } |
| 54 | |
| 55 | if (options.tension || options.cubicInterpolationMode === 'monotone') { |
| 56 | return _bezierCurveTo; |
| 57 | } |
| 58 | |
| 59 | return lineTo; |
| 60 | } |
| 61 | |
| 62 | function pathVars(points: PointElement[], segment: PathSegment, params: PathParams = {}) { |
| 63 | const count = points.length; |