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

Method add_ink_annot

src/__init__.py:10434–10446  ·  view source on GitHub ↗

Add a 'Ink' ('handwriting') annotation. The argument must be a list of lists of point_likes.

(self, handwriting: list)

Source from the content-addressed store, hash-verified

10432 return ret
10433
10434 def add_ink_annot(self, handwriting: list) -> Annot:
10435 """Add a 'Ink' ('handwriting') annotation.
10436
10437 The argument must be a list of lists of point_likes.
10438 """
10439 old_rotation = annot_preprocess(self)
10440 try:
10441 annot = self._add_ink_annot(handwriting)
10442 finally:
10443 if old_rotation != 0:
10444 self.set_rotation(old_rotation)
10445 annot_postprocess(self, annot)
10446 return annot
10447
10448 def add_line_annot(self, p1: point_like, p2: point_like) -> Annot:
10449 """Add a 'Line' annotation."""

Callers 3

test_3209Function · 0.80
test_add_ink_annotFunction · 0.80
annotations-ink.pyFile · 0.80

Calls 4

_add_ink_annotMethod · 0.95
set_rotationMethod · 0.95
annot_preprocessFunction · 0.85
annot_postprocessFunction · 0.85

Tested by 2

test_3209Function · 0.64
test_add_ink_annotFunction · 0.64