* Add a square (rectangle) annotation. * * @param options - Square annotation options * @returns The created annotation
(options: SquareAnnotationOptions)
| 2137 | * @returns The created annotation |
| 2138 | */ |
| 2139 | addSquareAnnotation(options: SquareAnnotationOptions): PDFSquareAnnotation { |
| 2140 | const annotDict = PDFSquareAnnotation.create(options); |
| 2141 | |
| 2142 | // Register and add to page |
| 2143 | const annotRef = this.ctx.register(annotDict); |
| 2144 | this.addAnnotationRef(annotRef); |
| 2145 | |
| 2146 | // oxlint-disable-next-line typescript/no-unsafe-type-assertion |
| 2147 | return createAnnotation(annotDict, annotRef, this.ctx.registry) as PDFSquareAnnotation; |
| 2148 | } |
| 2149 | |
| 2150 | /** |
| 2151 | * Add a circle (ellipse) annotation. |
no test coverage detected