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

Method add_highlight_annot

src/__init__.py:10424–10432  ·  view source on GitHub ↗

Add a 'Highlight' annotation.

(self, quads=None, start=None,
                          stop=None, clip=None)

Source from the content-addressed store, hash-verified

10422 return annot
10423
10424 def add_highlight_annot(self, quads=None, start=None,
10425 stop=None, clip=None) -> Annot:
10426 """Add a 'Highlight' annotation."""
10427 if quads is None:
10428 q = get_highlight_selection(self, start=start, stop=stop, clip=clip)
10429 else:
10430 q = CheckMarkerArg(quads)
10431 ret = self._add_text_marker(q, mupdf.PDF_ANNOT_HIGHLIGHT)
10432 return ret
10433
10434 def add_ink_annot(self, handwriting: list) -> Annot:
10435 """Add a 'Ink' ('handwriting') annotation.

Callers 5

test_highlightFunction · 0.80
test_parentFunction · 0.80
test_4245Function · 0.80
new-annots.pyFile · 0.80

Calls 3

_add_text_markerMethod · 0.95
get_highlight_selectionFunction · 0.85
CheckMarkerArgFunction · 0.85

Tested by 4

test_highlightFunction · 0.64
test_parentFunction · 0.64
test_4245Function · 0.64