コード例 #1
0
ファイル: example_bot.py プロジェクト: Apkawa/screen_bot
 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)},
             ])
コード例 #2
0
ファイル: example_bot.py プロジェクト: Apkawa/screen_bot
 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)},
             ])