Exemplo n.º 1
0
 def _get_height(self):
     gc = PlotGraphicsContext((100, 100), dpi=72)
     gc.set_font(self.label_font)
     (w, h, descent, leading) = gc.get_full_text_extent(self.label)
     return self._image.height() + h
Exemplo n.º 2
0
 def _get_height(self):
     gc = PlotGraphicsContext((100, 100), dpi=72)
     gc.set_font(self.label_font)
     (w, h, descent, leading) = gc.get_full_text_extent(self.label)
     return self._image.height() + h
Exemplo n.º 3
0
 def _get_width(self):
     gc = PlotGraphicsContext((100, 100), dpi=72)
     gc.set_font(self.label_font)
     (w, h, descent, leading) = gc.get_full_text_extent(self.label)
     return max(self._image.width(), w)
Exemplo n.º 4
0
 def _get_width(self):
     gc = PlotGraphicsContext((100, 100), dpi=72)
     gc.set_font(self.label_font)
     (w, h, descent, leading) = gc.get_full_text_extent(self.label)
     return max(self._image.width(), w)