Add a 'Line' annotation.
(self, p1: point_like, p2: point_like)
| 10446 | return annot |
| 10447 | |
| 10448 | def add_line_annot(self, p1: point_like, p2: point_like) -> Annot: |
| 10449 | """Add a 'Line' annotation.""" |
| 10450 | old_rotation = annot_preprocess(self) |
| 10451 | try: |
| 10452 | annot = self._add_line_annot(p1, p2) |
| 10453 | finally: |
| 10454 | if old_rotation != 0: |
| 10455 | self.set_rotation(old_rotation) |
| 10456 | annot_postprocess(self, annot) |
| 10457 | return annot |
| 10458 | |
| 10459 | def add_polygon_annot(self, points: list) -> Annot: |
| 10460 | """Add a 'Polygon' annotation.""" |