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

Class CT_ShapeProperties

src/pptx/oxml/shapes/shared.py:344–441  ·  view source on GitHub ↗

Custom element class for `p:spPr` element. Shared by `p:sp`, `p:cxnSp`, and `p:pic` elements as well as a few more obscure ones.

Source from the content-addressed store, hash-verified

342
343
344class CT_ShapeProperties(BaseOxmlElement):
345 """Custom element class for `p:spPr` element.
346
347 Shared by `p:sp`, `p:cxnSp`, and `p:pic` elements as well as a few more obscure ones.
348 """
349
350 get_or_add_xfrm: Callable[[], CT_Transform2D]
351 get_or_add_ln: Callable[[], CT_LineProperties]
352 _add_prstGeom: Callable[[], CT_PresetGeometry2D]
353 _remove_custGeom: Callable[[], None]
354
355 _tag_seq = (
356 "a:xfrm",
357 "a:custGeom",
358 "a:prstGeom",
359 "a:noFill",
360 "a:solidFill",
361 "a:gradFill",
362 "a:blipFill",
363 "a:pattFill",
364 "a:grpFill",
365 "a:ln",
366 "a:effectLst",
367 "a:effectDag",
368 "a:scene3d",
369 "a:sp3d",
370 "a:extLst",
371 )
372 xfrm: CT_Transform2D | None = ZeroOrOne( # pyright: ignore[reportAssignmentType]
373 "a:xfrm", successors=_tag_seq[1:]
374 )
375 custGeom: CT_CustomGeometry2D | None = ZeroOrOne( # pyright: ignore[reportAssignmentType]
376 "a:custGeom", successors=_tag_seq[2:]
377 )
378 prstGeom: CT_PresetGeometry2D | None = ZeroOrOne( # pyright: ignore[reportAssignmentType]
379 "a:prstGeom", successors=_tag_seq[3:]
380 )
381 eg_fillProperties = ZeroOrOneChoice(
382 (
383 Choice("a:noFill"),
384 Choice("a:solidFill"),
385 Choice("a:gradFill"),
386 Choice("a:blipFill"),
387 Choice("a:pattFill"),
388 Choice("a:grpFill"),
389 ),
390 successors=_tag_seq[9:],
391 )
392 ln: CT_LineProperties | None = ZeroOrOne( # pyright: ignore[reportAssignmentType]
393 "a:ln", successors=_tag_seq[10:]
394 )
395 effectLst = ZeroOrOne("a:effectLst", successors=_tag_seq[11:])
396 del _tag_seq
397
398 @property
399 def cx(self):
400 """
401 Shape width as an instance of Emu, or None if not present.

Callers

nothing calls this directly

Calls 3

ZeroOrOneClass · 0.90
ZeroOrOneChoiceClass · 0.90
ChoiceClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…