()
| 228 | print( f'Have saved to: {path}') |
| 229 | |
| 230 | def test_opacity(): |
| 231 | doc = pymupdf.open() |
| 232 | page = doc.new_page() |
| 233 | |
| 234 | annot1 = page.add_circle_annot((50, 50, 100, 100)) |
| 235 | annot1.set_colors(fill=(1, 0, 0), stroke=(1, 0, 0)) |
| 236 | annot1.set_opacity(2 / 3) |
| 237 | annot1.update(blend_mode="Multiply") |
| 238 | |
| 239 | annot2 = page.add_circle_annot((75, 75, 125, 125)) |
| 240 | annot2.set_colors(fill=(0, 0, 1), stroke=(0, 0, 1)) |
| 241 | annot2.set_opacity(1 / 3) |
| 242 | annot2.update(blend_mode="Multiply") |
| 243 | outfile = f'{scriptdir}/resources/opacity.pdf' |
| 244 | doc.save(outfile, expand=True, pretty=True) |
| 245 | print("saved", outfile) |
| 246 | |
| 247 | def test_get_text_dict(): |
| 248 | import json |
nothing calls this directly
no test coverage detected
searching dependent graphs…