Provides access to patterned fill properties.
| 294 | |
| 295 | |
| 296 | class _PattFill(_Fill): |
| 297 | """Provides access to patterned fill properties.""" |
| 298 | |
| 299 | def __init__(self, pattFill): |
| 300 | super(_PattFill, self).__init__() |
| 301 | self._element = self._pattFill = pattFill |
| 302 | |
| 303 | @lazyproperty |
| 304 | def back_color(self): |
| 305 | """Return |ColorFormat| object that controls background color.""" |
| 306 | bgClr = self._pattFill.get_or_add_bgClr() |
| 307 | return ColorFormat.from_colorchoice_parent(bgClr) |
| 308 | |
| 309 | @lazyproperty |
| 310 | def fore_color(self): |
| 311 | """Return |ColorFormat| object that controls foreground color.""" |
| 312 | fgClr = self._pattFill.get_or_add_fgClr() |
| 313 | return ColorFormat.from_colorchoice_parent(fgClr) |
| 314 | |
| 315 | @property |
| 316 | def pattern(self): |
| 317 | """Return member of :ref:`MsoPatternType` indicating fill pattern. |
| 318 | |
| 319 | Returns |None| if no pattern has been set; PowerPoint may display the |
| 320 | default `PERCENT_5` pattern in this case. Assigning |None| will |
| 321 | remove any explicit pattern setting. |
| 322 | """ |
| 323 | return self._pattFill.prst |
| 324 | |
| 325 | @pattern.setter |
| 326 | def pattern(self, pattern_type): |
| 327 | self._pattFill.prst = pattern_type |
| 328 | |
| 329 | @property |
| 330 | def type(self): |
| 331 | return MSO_FILL.PATTERNED |
| 332 | |
| 333 | |
| 334 | class _SolidFill(_Fill): |
no outgoing calls
searching dependent graphs…