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

Method draw_image

lib/matplotlib/backends/backend_wx.py:210–224  ·  view source on GitHub ↗
(self, gc, x, y, im)

Source from the content-addressed store, hash-verified

208 gc.unselect()
209
210 def draw_image(self, gc, x, y, im):
211 bbox = gc.get_clip_rectangle()
212 if bbox is not None:
213 l, b, w, h = bbox.bounds
214 else:
215 l = 0
216 b = 0
217 w = self.width
218 h = self.height
219 rows, cols = im.shape[:2]
220 bitmap = wx.Bitmap.FromBufferRGBA(cols, rows, im.tobytes())
221 gc.select()
222 gc.gfx_ctx.DrawBitmap(bitmap, int(l), int(self.height - b),
223 int(w), int(-h))
224 gc.unselect()
225
226 def draw_text(self, gc, x, y, s, prop, angle, ismath=False, mtext=None):
227 # docstring inherited

Callers

nothing calls this directly

Calls 3

get_clip_rectangleMethod · 0.80
selectMethod · 0.80
unselectMethod · 0.80

Tested by

no test coverage detected