(self, rgb_or_rgba)
| 432 | self._logwarn_once = functools.cache(_log.warning) |
| 433 | |
| 434 | def _is_transparent(self, rgb_or_rgba): |
| 435 | if rgb_or_rgba is None: |
| 436 | return True # Consistent with rgbFace semantics. |
| 437 | elif len(rgb_or_rgba) == 4: |
| 438 | if rgb_or_rgba[3] == 0: |
| 439 | return True |
| 440 | if rgb_or_rgba[3] != 1: |
| 441 | self._logwarn_once( |
| 442 | "The PostScript backend does not support transparency; " |
| 443 | "partially transparent artists will be rendered opaque.") |
| 444 | return False |
| 445 | else: # len() == 3. |
| 446 | return False |
| 447 | |
| 448 | def set_color(self, r, g, b, store=True): |
| 449 | if (r, g, b) != self.color: |
no outgoing calls
no test coverage detected