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

Method fill

src/pptx/slide.py:472–498  ·  view source on GitHub ↗

|FillFormat| instance for this background. This |FillFormat| object is used to interrogate or specify the fill of the slide background. Note that accessing this property is potentially destructive. A slide background can also be specified by a background style refer

(self)

Source from the content-addressed store, hash-verified

470
471 @lazyproperty
472 def fill(self):
473 """|FillFormat| instance for this background.
474
475 This |FillFormat| object is used to interrogate or specify the fill
476 of the slide background.
477
478 Note that accessing this property is potentially destructive. A slide
479 background can also be specified by a background style reference and
480 accessing this property will remove that reference, if present, and
481 replace it with NoFill. This is frequently the case for a slide
482 master background.
483
484 This is also the case when there is no explicitly defined background
485 (background is inherited); merely accessing this property will cause
486 the background to be set to NoFill and the inheritance link will be
487 interrupted. This is frequently the case for a slide background.
488
489 Of course, if you are accessing this property in order to set the
490 fill, then these changes are of no consequence, but the existing
491 background cannot be reliably interrogated using this property unless
492 you have already established it is an explicit fill.
493
494 If the background is already a fill, then accessing this property
495 makes no changes to the current background.
496 """
497 bgPr = self._cSld.get_or_add_bgPr()
498 return FillFormat.from_fill_parent(bgPr)

Callers

nothing calls this directly

Calls 2

get_or_add_bgPrMethod · 0.80
from_fill_parentMethod · 0.80

Tested by

no test coverage detected