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

Method createTilingPattern

src/api/pdf.ts:2322–2328  ·  view source on GitHub ↗

* Create a tiling pattern. * * @param options - Pattern options including bbox, step sizes, and operators * @returns PDFPattern resource for use with page.registerPattern() * * @example * ```typescript * const pattern = pdf.createTilingPattern({ * bbox: { x: 0, y: 0, width:

(options: TilingPatternOptions)

Source from the content-addressed store, hash-verified

2320 * ```
2321 */
2322 createTilingPattern(options: TilingPatternOptions): PDFTilingPattern {
2323 const contentBytes = serializeOperators(options.operators);
2324 const stream = PDFTilingPattern.createStream(options, contentBytes);
2325 const ref = this.register(stream);
2326
2327 return new PDFTilingPattern(ref);
2328 }
2329
2330 /**
2331 * Create an image pattern for filling shapes with a tiled image.

Calls 3

registerMethod · 0.95
serializeOperatorsFunction · 0.90
createStreamMethod · 0.45

Tested by

no test coverage detected