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

Method setBorderStyle

src/annotations/base.ts:301–313  ·  view source on GitHub ↗

* Set the border style.

(style: BorderStyle)

Source from the content-addressed store, hash-verified

299 * Set the border style.
300 */
301 setBorderStyle(style: BorderStyle): void {
302 const bs = new PdfDict();
303
304 bs.set("W", PdfNumber.of(style.width ?? 1));
305 bs.set("S", PdfName.of(BORDER_STYLE_REVERSE_MAP[style.style ?? "solid"]));
306
307 if (style.dashArray && style.dashArray.length > 0) {
308 bs.set("D", new PdfArray(style.dashArray.map(n => PdfNumber.of(n))));
309 }
310
311 this.dict.set("BS", bs);
312 this.markModified();
313 }
314
315 // ─────────────────────────────────────────────────────────────────────────────
316 // Appearance Streams

Callers

nothing calls this directly

Calls 4

setMethod · 0.95
markModifiedMethod · 0.95
mapMethod · 0.80
ofMethod · 0.45

Tested by

no test coverage detected