MCPcopy Create free account
hub / github.com/Paper2Poster/Paper2Poster / del_image

Function del_image

utils/src/apis.py:234–244  ·  view source on GitHub ↗

Delete an image from a slide. Args: slide (SlidePage): The slide containing the image. figure_id (int): The ID of the image to delete.

(slide: SlidePage, figure_id: int)

Source from the content-addressed store, hash-verified

232
233
234def del_image(slide: SlidePage, figure_id: int):
235 """
236 Delete an image from a slide.
237
238 Args:
239 slide (SlidePage): The slide containing the image.
240 figure_id (int): The ID of the image to delete.
241 """
242 shape = element_index(slide, figure_id)
243 assert isinstance(shape, Picture), "The element is not a Picture."
244 slide.shapes.remove(shape)
245
246
247def replace_paragraph(slide: SlidePage, div_id: int, paragraph_id: int, text: str):

Callers

nothing calls this directly

Calls 1

element_indexFunction · 0.70

Tested by

no test coverage detected