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

Method draw_text

lib/matplotlib/backends/backend_agg.py:235–249  ·  view source on GitHub ↗
(self, gc, x, y, s, prop, angle, ismath=False, mtext=None)

Source from the content-addressed store, hash-verified

233 parse.rects)
234
235 def draw_text(self, gc, x, y, s, prop, angle, ismath=False, mtext=None):
236 # docstring inherited
237 if ismath:
238 return self.draw_mathtext(gc, x, y, s, prop, angle)
239 font = self._prepare_font(prop)
240 items = font._layout(
241 s, flags=get_hinting_flag(),
242 features=mtext.get_fontfeatures() if mtext is not None else None,
243 language=mtext.get_language() if mtext is not None else None)
244 size = prop.get_size_in_points()
245 self._draw_text_glyphs_and_boxes(
246 gc, x, y, angle,
247 ((item.ft_object, size, item.glyph_index, 0, 1, item.x, item.y)
248 for item in items),
249 [])
250
251 def get_text_width_height_descent(self, s, prop, ismath):
252 # docstring inherited

Callers

nothing calls this directly

Calls 6

draw_mathtextMethod · 0.95
_prepare_fontMethod · 0.95
get_hinting_flagFunction · 0.85
get_fontfeaturesMethod · 0.80
get_languageMethod · 0.80

Tested by

no test coverage detected