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

Function test_polyline

tests/test_annots.py:88–99  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

86
87
88def test_polyline():
89 doc = pymupdf.open()
90 page = doc.new_page()
91 rect = page.rect + (100, 36, -100, -36)
92 cell = pymupdf.make_table(rect, rows=10)
93 for i in range(10):
94 annot = page.add_polyline_annot((cell[i][0].bl, cell[i][0].br))
95 annot.set_line_ends(i, i)
96 annot.update()
97 for i, annot in enumerate(page.annots()):
98 assert annot.line_ends == (i, i)
99 assert annot.type == (7, "PolyLine")
100
101
102def test_polygon():

Callers

nothing calls this directly

Calls 5

new_pageMethod · 0.80
add_polyline_annotMethod · 0.80
set_line_endsMethod · 0.80
annotsMethod · 0.80
updateMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…