Logo Search packages:      
Sourcecode: matplotlib version File versions  Download package

def matplotlib::backends::backend_agg::RendererAgg::draw_text (   self,
  gc,
  x,
  y,
  s,
  prop,
  angle,
  ismath 
)

Render the text

Reimplemented from matplotlib::backend_bases::RendererBase.

Definition at line 203 of file backend_agg.py.

00203                                                          :
        """
        Render the text
        """
        if __debug__: verbose.report('RendererAgg.draw_text', 'debug-annoying')

        if ismath:
            return self.draw_mathtext(gc, x, y, s, prop, angle)

        font = self._get_agg_font(prop)
        if font is None: return None
        if len(s)==1 and ord(s)>127:

            font.load_char(ord(s))
        else:
            font.set_text(s, angle)
        font.draw_glyphs_to_bitmap()

        #print x, y, int(x), int(y)

        self._renderer.draw_text(font, int(x), int(y), gc)


    def get_text_width_height(self, s, prop, ismath, rgb=(0,0,0)):


Generated by  Doxygen 1.6.0   Back to index