MCPcopy
hub / github.com/diegomura/react-pdf / lineTo

Function lineTo

packages/svgkit/src/page/vector.js:41–51  ·  view source on GitHub ↗
(x, y)

Source from the content-addressed store, hash-verified

39 },
40
41 lineTo(x, y) {
42 if (!this.currentPath) this.beginPath();
43
44 this.currentPosition = { x, y };
45
46 if (this.currentPath.indexOf('M') > -1) {
47 this.addPathCommand(`L ${x} ${y}`);
48 } else {
49 this.addPathCommand(`M ${x} ${y}`);
50 }
51 },
52
53 bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y) {
54 if (!this.currentPath) this.beginPath();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected