Add a 'Square' (rectangle) annotation.
(self, rect: rect_like)
| 10479 | return annot |
| 10480 | |
| 10481 | def add_rect_annot(self, rect: rect_like) -> Annot: |
| 10482 | """Add a 'Square' (rectangle) annotation.""" |
| 10483 | old_rotation = annot_preprocess(self) |
| 10484 | try: |
| 10485 | annot = self._add_square_or_circle(rect, mupdf.PDF_ANNOT_SQUARE) |
| 10486 | finally: |
| 10487 | if old_rotation != 0: |
| 10488 | self.set_rotation(old_rotation) |
| 10489 | annot_postprocess(self, annot) |
| 10490 | return annot |
| 10491 | |
| 10492 | def add_redact_annot( |
| 10493 | self, |