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

Function test_freetext

tests/test_annots.py:35–49  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

33
34
35def test_freetext():
36 doc = pymupdf.open()
37 page = doc.new_page()
38 annot = page.add_freetext_annot(
39 rect,
40 t1,
41 fontsize=10,
42 rotate=90,
43 text_color=blue,
44 fill_color=gold,
45 align=pymupdf.TEXT_ALIGN_CENTER,
46 )
47 annot.set_border(width=0.3, dashes=[2])
48 annot.update(text_color=blue, fill_color=gold)
49 assert annot.type == (2, "FreeText")
50
51
52def test_text():

Callers

nothing calls this directly

Calls 4

new_pageMethod · 0.80
add_freetext_annotMethod · 0.80
set_borderMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…