MCPcopy Create free account
hub / github.com/scanny/python-pptx / _LayoutShapeFactory

Function _LayoutShapeFactory

src/pptx/shapes/shapetree.py:823–827  ·  view source on GitHub ↗

Return appropriate shape object for `shape_elm` on a slide layout.

(shape_elm: ShapeElement, parent: ProvidesPart)

Source from the content-addressed store, hash-verified

821
822
823def _LayoutShapeFactory(shape_elm: ShapeElement, parent: ProvidesPart) -> BaseShape:
824 """Return appropriate shape object for `shape_elm` on a slide layout."""
825 if isinstance(shape_elm, CT_Shape) and shape_elm.has_ph_elm:
826 return LayoutPlaceholder(shape_elm, parent)
827 return BaseShapeFactory(shape_elm, parent)
828
829
830def _MasterShapeFactory(shape_elm: ShapeElement, parent: ProvidesPart) -> BaseShape:

Callers 3

_shape_factoryMethod · 0.85
_shape_factoryMethod · 0.85

Calls 2

LayoutPlaceholderClass · 0.90
BaseShapeFactoryFunction · 0.85

Used in the wild real call sites across dependent graphs

searching dependent graphs…