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

Method build

utils/src/presentation.py:521–536  ·  view source on GitHub ↗
(self, slide: PPTXSlide)

Source from the content-addressed store, hash-verified

519 return picture
520
521 def build(self, slide: PPTXSlide):
522 shape = slide.shapes.add_picture(
523 self.img_path,
524 **self.style["shape_bounds"],
525 )
526 shape.name = self.data[1]
527 dict_to_object(self.style["img_style"], shape.image)
528 apply_fill(shape, self.style["fill"])
529 if self.style["line"] is not None:
530 apply_fill(shape.line, self.style["line"]["fill"])
531 dict_to_object(self.style["line"], shape.line, exclude=["fill"])
532
533 dict_to_object(self.style["shape_bounds"], shape)
534 if "rotation" in dir(shape):
535 shape.rotation = self.style["rotation"]
536 return shape
537
538 @property
539 def img_path(self):

Callers

nothing calls this directly

Calls 2

dict_to_objectFunction · 0.90
apply_fillFunction · 0.90

Tested by

no test coverage detected