MCPcopy Create free account
hub / github.com/ColdGrub1384/Pyto / render_glyph

Method render_glyph

site-packages/matplotlib/mathtext.py:226–243  ·  view source on GitHub ↗
(self, ox, oy, info)

Source from the content-addressed store, hash-verified

224 self.lastfont = None
225
226 def render_glyph(self, ox, oy, info):
227 oy = self.height - oy + info.offset
228 postscript_name = info.postscript_name
229 fontsize = info.fontsize
230 symbol_name = info.symbol_name
231
232 if (postscript_name, fontsize) != self.lastfont:
233 ps = """/%(postscript_name)s findfont
234%(fontsize)s scalefont
235setfont
236""" % locals()
237 self.lastfont = postscript_name, fontsize
238 self.pswriter.write(ps)
239
240 ps = """%(ox)f %(oy)f moveto
241/%(symbol_name)s glyphshow\n
242""" % locals()
243 self.pswriter.write(ps)
244
245 def render_rect_filled(self, x1, y1, x2, y2):
246 ps = "%f %f %f %f rectfill\n" % (x1, self.height - y2, x2 - x1, y2 - y1)

Callers

nothing calls this directly

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected