MCPcopy Create free account
hub / github.com/LibPDF-js/core / setInkPaths

Method setInkPaths

src/annotations/ink.ts:129–145  ·  view source on GitHub ↗

* Set the ink paths.

(paths: Point[][])

Source from the content-addressed store, hash-verified

127 * Set the ink paths.
128 */
129 setInkPaths(paths: Point[][]): void {
130 const inkList = new PdfArray([]);
131
132 for (const path of paths) {
133 const pathArr = new PdfArray([]);
134
135 for (const point of path) {
136 pathArr.push(PdfNumber.of(point.x));
137 pathArr.push(PdfNumber.of(point.y));
138 }
139
140 inkList.push(pathArr);
141 }
142
143 this.dict.set("InkList", inkList);
144 this.markModified();
145 }
146
147 /**
148 * Stroke width from border style.

Callers

nothing calls this directly

Calls 4

pushMethod · 0.95
markModifiedMethod · 0.80
ofMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected