How to use the pyscreeze.center function in PyScreeze

To help you get started, we’ve selected a few PyScreeze examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github asweigart / pyscreeze / tests / test_pyscreeze.py View on Github external
def test_namesDefined(self):
        pyscreeze.locateAll
        pyscreeze.locate
        pyscreeze.locateOnScreen
        pyscreeze.locateAllOnScreen
        pyscreeze.locateCenterOnScreen
        pyscreeze.center
        pyscreeze.pixelMatchesColor
        pyscreeze.pixel
        pyscreeze.grab
github asweigart / pyscreeze / tests / test_pyscreeze.py View on Github external
def test_center(self):
        self.assertEqual((10, 10), pyscreeze.center((0, 0, 20, 20)))
        self.assertEqual((10, 10), pyscreeze.center((5, 5, 10, 10)))

        self.assertEqual((100, 100), pyscreeze.center((0, 0, 200, 200)))
        self.assertEqual((100, 100), pyscreeze.center((50, 50, 100, 100)))