MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / _is_transparent

Method _is_transparent

lib/matplotlib/backends/backend_ps.py:434–446  ·  view source on GitHub ↗
(self, rgb_or_rgba)

Source from the content-addressed store, hash-verified

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:

Callers 4

draw_markersMethod · 0.95
draw_texMethod · 0.95
draw_textMethod · 0.95
_draw_psMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected