Esempio n. 1
0
 def draw(self, cr):
     if not self.ofs or not self.base:
         return
     self.app.setup_context(cr)
     cr.move_to(*self.base)
     box = cairotool.gdk_rectangle_get_extents(self.base, self.ofs)
     cr.rectangle(*box)
     cr.stroke()
Esempio n. 2
0
 def get_damage_area(self):
     box = cairotool.gdk_rectangle_get_extents(*self.points)
     return cairotool.gdk_rectangle_pad(box, self.app.line_width * 2)