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

Method _draw_idle

lib/matplotlib/backends/backend_macosx.py:79–93  ·  view source on GitHub ↗

Draw method for singleshot timer This draw method can be added to a singleshot timer, which can accumulate draws while the eventloop is spinning. This method will then only draw the first time and short-circuit the others.

(self)

Source from the content-addressed store, hash-verified

77 timer.start()
78
79 def _draw_idle(self):
80 """
81 Draw method for singleshot timer
82
83 This draw method can be added to a singleshot timer, which can
84 accumulate draws while the eventloop is spinning. This method will
85 then only draw the first time and short-circuit the others.
86 """
87 with self._idle_draw_cntx():
88 if not self._draw_pending:
89 # Short-circuit because our draw request has already been
90 # taken care of
91 return
92 self._draw_pending = False
93 self.draw()
94
95 def blit(self, bbox=None):
96 # docstring inherited

Callers

nothing calls this directly

Calls 2

drawMethod · 0.95
_idle_draw_cntxMethod · 0.80

Tested by

no test coverage detected