Exemplo n.º 1
0
Arquivo: PIL.py Projeto: bgnori/bglib
 def draw_rect(self, position, size, fill=None):
     assert self.dc is not None
     draw = self.dc[1]
     x2, y2 = position
     x2 += size[0]
     y2 += size[1]
     draw.rectangle([position, (x2 - 1, y2 - 1)], fill=fill)
Exemplo n.º 2
0
Arquivo: wx2.py Projeto: bgnori/bglib
 def draw_rect(self, position, size, fill=None):
   position=self.calc_mag(position)
   size=self.calc_mag(size)
   draw = self.dc[1]
   x2, y2 = position
   x2 += size[0]
   y2 += size[1]
   draw.rectangle([position, (x2-1, y2-1)], fill=fill)