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

Method __init__

lib/matplotlib/backends/backend_wx.py:308–325  ·  view source on GitHub ↗
(self, bitmap, renderer)

Source from the content-addressed store, hash-verified

306 _cache = weakref.WeakKeyDictionary()
307
308 def __init__(self, bitmap, renderer):
309 super().__init__()
310 # assert self.Ok(), "wxMemoryDC not OK to use"
311 _log.debug("%s - __init__(): %s", type(self), bitmap)
312
313 dc, gfx_ctx = self._cache.get(bitmap, (None, None))
314 if dc is None:
315 dc = wx.MemoryDC(bitmap)
316 gfx_ctx = wx.GraphicsContext.Create(dc)
317 gfx_ctx._lastcliprect = None
318 self._cache[bitmap] = dc, gfx_ctx
319
320 self.bitmap = bitmap
321 self.dc = dc
322 self.gfx_ctx = gfx_ctx
323 self._pen = wx.Pen('BLACK', 1, wx.SOLID)
324 gfx_ctx.SetPen(self._pen)
325 self.renderer = renderer
326
327 def select(self):
328 """Select the current bitmap into this wxDC instance."""

Callers

nothing calls this directly

Calls 2

__init__Method · 0.45
getMethod · 0.45

Tested by

no test coverage detected