コード例 #1
0
def byDistanceTo(x, y=None):
    """ Method to compare two Region objects by distance of their top left.
    or a regions top left to the given point by coordinates"""
    return DistanceComparator(x, y)
コード例 #2
0
ファイル: Sikuli.py プロジェクト: xuezh01/SikuliX1
def distanceComparator(x, y=None):
    """ Method to compare two Region objects by distance of their top left.
    or a regions top left to the given point by coordinates"""
    if y is None:
        return DistanceComparator(x).compare  # x is Region or Location
    return DistanceComparator(x, y).compare  # x/y as coordinates