コード例 #1
0
 def text(self, txt, x, y, width=0, height=0, outline=False, draw=True, **kwargs):
     if outline:
         t = CanvasContext.text(self, unicode(txt), x, y, width, height, Boolean(False))
         p = t.path
         self._setAttributesFromKwargs(p, **kwargs)
         if draw:
             self.addPath(p)
         return p
     else:
         t = CanvasContext.text(self, unicode(txt), x, y, width, height, Boolean(draw))
         self._setAttributesFromKwargs(t, **kwargs)
         return t