(
page: Page,
point: point_like,
text: typing.Union[str, list],
fontsize: float = 11,
lineheight: OptFloat = None,
fontname: str = "helv",
fontfile: OptStr = None,
set_simple: int = 0,
encoding: int = 0,
color: OptSeq = None,
fill: OptSeq = None,
border_width: float = 0.05,
render_mode: int = 0,
rotate: int = 0,
morph: OptSeq = None,
overlay: bool = True,
stroke_opacity: float = 1,
fill_opacity: float = 1,
oc: int = 0,
)
| 1795 | |
| 1796 | |
| 1797 | def insert_text( |
| 1798 | page: Page, |
| 1799 | point: point_like, |
| 1800 | text: typing.Union[str, list], |
| 1801 | fontsize: float = 11, |
| 1802 | lineheight: OptFloat = None, |
| 1803 | fontname: str = "helv", |
| 1804 | fontfile: OptStr = None, |
| 1805 | set_simple: int = 0, |
| 1806 | encoding: int = 0, |
| 1807 | color: OptSeq = None, |
| 1808 | fill: OptSeq = None, |
| 1809 | border_width: float = 0.05, |
| 1810 | render_mode: int = 0, |
| 1811 | rotate: int = 0, |
| 1812 | morph: OptSeq = None, |
| 1813 | overlay: bool = True, |
| 1814 | stroke_opacity: float = 1, |
| 1815 | fill_opacity: float = 1, |
| 1816 | oc: int = 0, |
| 1817 | ): |
| 1818 | img = page.new_shape() |
| 1819 | rc = img.insert_text( |
| 1820 | point, |
| 1821 | text, |
| 1822 | fontsize=fontsize, |
| 1823 | lineheight=lineheight, |
| 1824 | fontname=fontname, |
| 1825 | fontfile=fontfile, |
| 1826 | set_simple=set_simple, |
| 1827 | encoding=encoding, |
| 1828 | color=color, |
| 1829 | fill=fill, |
| 1830 | border_width=border_width, |
| 1831 | render_mode=render_mode, |
| 1832 | rotate=rotate, |
| 1833 | morph=morph, |
| 1834 | stroke_opacity=stroke_opacity, |
| 1835 | fill_opacity=fill_opacity, |
| 1836 | oc=oc, |
| 1837 | ) |
| 1838 | if rc >= 0: |
| 1839 | img.commit(overlay) |
| 1840 | return rc |
| 1841 | |
| 1842 | |
| 1843 | def new_page( |
nothing calls this directly
no test coverage detected
searching dependent graphs…