MCPcopy Create free account
hub / github.com/pymupdf/PyMuPDF / add_polyline_annot

Method add_polyline_annot

src/__init__.py:10470–10479  ·  view source on GitHub ↗

Add a 'PolyLine' annotation.

(self, points: list)

Source from the content-addressed store, hash-verified

10468 return annot
10469
10470 def add_polyline_annot(self, points: list) -> Annot:
10471 """Add a 'PolyLine' annotation."""
10472 old_rotation = annot_preprocess(self)
10473 try:
10474 annot = self._add_multiline(points, mupdf.PDF_ANNOT_POLY_LINE)
10475 finally:
10476 if old_rotation != 0:
10477 self.set_rotation(old_rotation)
10478 annot_postprocess(self, annot)
10479 return annot
10480
10481 def add_rect_annot(self, rect: rect_like) -> Annot:
10482 """Add a 'Square' (rectangle) annotation."""

Callers 2

test_polylineFunction · 0.80
new-annots.pyFile · 0.80

Calls 4

_add_multilineMethod · 0.95
set_rotationMethod · 0.95
annot_preprocessFunction · 0.85
annot_postprocessFunction · 0.85

Tested by 1

test_polylineFunction · 0.64