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

Method createRadialShading

src/api/pdf.ts:2263–2268  ·  view source on GitHub ↗

* Create a radial shading with explicit coordinates. * * @param options - Shading options including coords and color stops * @returns PDFShading resource for use with page.registerShading() * * @example * ```typescript * const radial = pdf.createRadialShading({ * coords: [5

(options: RadialShadingOptions)

Source from the content-addressed store, hash-verified

2261 * ```
2262 */
2263 createRadialShading(options: RadialShadingOptions): PDFShading {
2264 const dict = PDFShading.createRadialDict(options);
2265 const ref = this.register(dict);
2266
2267 return new PDFShading(ref, "radial");
2268 }
2269
2270 /**
2271 * Create a linear gradient using angle and length (CSS-style).

Callers 3

factory.test.tsFile · 0.80

Calls 2

registerMethod · 0.95
createRadialDictMethod · 0.80

Tested by

no test coverage detected