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

Method _add_line_annot

src/__init__.py:9679–9688  ·  view source on GitHub ↗
(self, p1, p2)

Source from the content-addressed store, hash-verified

9677 return Annot(annot)
9678
9679 def _add_line_annot(self, p1, p2):
9680 page = self._pdf_page()
9681 annot = mupdf.pdf_create_annot(page, mupdf.PDF_ANNOT_LINE)
9682 a = JM_point_from_py(p1)
9683 b = JM_point_from_py(p2)
9684 mupdf.pdf_set_annot_line(annot, a, b)
9685 mupdf.pdf_update_annot(annot)
9686 JM_add_annot_id(annot, "A")
9687 assert annot.m_internal
9688 return Annot(annot)
9689
9690 def _add_multiline(self, points, annot_type):
9691 page = self._pdf_page()

Callers 1

add_line_annotMethod · 0.95

Calls 4

_pdf_pageMethod · 0.95
JM_point_from_pyFunction · 0.85
JM_add_annot_idFunction · 0.85
AnnotClass · 0.85

Tested by

no test coverage detected