* Create an axial (linear) shading with explicit coordinates. * * @param options - Shading options including coords and color stops * @returns PDFShading resource for use with page.registerShading() * * @example * ```typescript * const gradient = pdf.createAxialShading({ *
(options: AxialShadingOptions)
| 2236 | * ``` |
| 2237 | */ |
| 2238 | createAxialShading(options: AxialShadingOptions): PDFShading { |
| 2239 | const dict = PDFShading.createAxialDict(options); |
| 2240 | const ref = this.register(dict); |
| 2241 | |
| 2242 | return new PDFShading(ref, "axial"); |
| 2243 | } |
| 2244 | |
| 2245 | /** |
| 2246 | * Create a radial shading with explicit coordinates. |
no test coverage detected