Return a new `` `` element populated with the values passed as parameters.
(cls, cx: Length, cy: Length, shape_id: int, pic: CT_Picture)
| 78 | |
| 79 | @classmethod |
| 80 | def new(cls, cx: Length, cy: Length, shape_id: int, pic: CT_Picture) -> CT_Inline: |
| 81 | """Return a new ``<wp:inline>`` element populated with the values passed as |
| 82 | parameters.""" |
| 83 | inline = cast(CT_Inline, parse_xml(cls._inline_xml())) |
| 84 | inline.extent.cx = cx |
| 85 | inline.extent.cy = cy |
| 86 | inline.docPr.id = shape_id |
| 87 | inline.docPr.name = "Picture %d" % shape_id |
| 88 | inline.graphic.graphicData.uri = "http://schemas.openxmlformats.org/drawingml/2006/picture" |
| 89 | inline.graphic.graphicData._insert_pic(pic) |
| 90 | return inline |
| 91 | |
| 92 | @classmethod |
| 93 | def new_pic_inline( |
no test coverage detected