Example #1
0
 def is_center_point_aviable(self, pix=None):
     pix = pix or self.screen.get_screen_image().load()
     return Color.match_all_color(pix,
             [
             {'x': self.screen.width / 2,
                 'y': self.screen.height / 2, 'rgb': (0, 0, 0)},
             ])
Example #2
0
 def match_screen(self, pix, x, y):
     return Color.match_all_color(pix,
             [
             {'x': x, 'y': y, 'rgb': (0, 0, 0)},
             {'x': x + self.width - 1, 'y': y, 'rgb': (0, 0, 0)},
             {'x': x, 'y': y + self.height - 1, 'rgb': (0, 0, 0)},
             {'x': x + self.width - 1,
                 'y': y + self.height - 1, 'rgb': (0, 0, 0)},
             ])