Exemplo n.º 1
0
 def clear_clip_region(self, color, update_region):
     "Clip and clear a Kiva graphics context to a specified region and color"
     bounds = coordinates_to_bounds(bounding_coordinates(update_region))
     self.clip_to_rect(*bounds)
     self.set_fill_color(color)
     for coordinates in update_region:
         bounds = coordinates_to_bounds(coordinates)
         self.begin_path()
         self.rect(*bounds)
     self.fill_path()
     return
Exemplo n.º 2
0
 def clear_clip(self, color, coordinates):
     "Clip and clear a Kiva graphics context to a specified area and color"
     bounds = coordinates_to_bounds(coordinates)
     self.clip_to_rect(*bounds)
     self.set_fill_color(color)
     self.draw_rect(bounds, FILL)
     return