Add image node (tag "img").
(self, name, width=None, height=None, imgfloat=None, align=None)
| 2224 | return child |
| 2225 | |
| 2226 | def add_image(self, name, width=None, height=None, imgfloat=None, align=None): |
| 2227 | """Add image node (tag "img").""" |
| 2228 | child = self.create_element("img") |
| 2229 | if width is not None: |
| 2230 | child.set_attribute("width", f"{width}") |
| 2231 | if height is not None: |
| 2232 | child.set_attribute("height", f"{height}") |
| 2233 | if imgfloat is not None: |
| 2234 | child.set_attribute("style", f"float: {imgfloat}") |
| 2235 | if align is not None: |
| 2236 | child.set_attribute("align", f"{align}") |
| 2237 | child.set_attribute("src", f"{name}") |
| 2238 | self.append_child(child) |
| 2239 | return child |
| 2240 | |
| 2241 | def add_link(self, href, text=None): |
| 2242 | """Add a hyperlink ("a" tag)""" |
nothing calls this directly
no test coverage detected