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

Method from_shape

utils/src/presentation.py:806–823  ·  view source on GitHub ↗
(
        cls,
        slide_idx: int,
        shape_idx: int,
        shape: PPTXAutoShape,
        style: dict,
        text_frame: TextFrame,
        config: Config,
        slide_area: float,
        level: int,
    )

Source from the content-addressed store, hash-verified

804class FreeShape(ShapeElement):
805 @classmethod
806 def from_shape(
807 cls,
808 slide_idx: int,
809 shape_idx: int,
810 shape: PPTXAutoShape,
811 style: dict,
812 text_frame: TextFrame,
813 config: Config,
814 slide_area: float,
815 level: int,
816 ):
817 data = {
818 "shape_type": shape.auto_shape_type.real,
819 "svg_tag": str(shape.auto_shape_type).split()[0].lower(),
820 }
821 return cls(
822 slide_idx, shape_idx, style, data, text_frame, slide_area, level=level
823 )
824
825 def to_html(self, style_args: StyleArg) -> str:
826 textframe = self.text_frame.to_html(style_args)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected