''' Module locate: provides support for locating the spot for a pixel grab Name 1: Name 2: Email id1: Email id2: ''' def same( spot, w, h ) : ''' Returns the location (x, y), where x, and y are the x- and y- coordinates of spot ''' x, y = spot return ( x, y ) def mirror( spot, w, h ) : ''' Returns the location (a, b), that is the x-axis mirroring of location spot (x, y) in a w x h image ''' x, y = spot a = (w-1) - x b = y return ( a, b ) def flip( spot, w, h ) : ''' Returns the location (a, b), that is the y-axis flipping of location spot (x, y) in a w x h image ''' x, y = spot a = x b = (h-1) - y return (a, b ) def ccw( spot, w, h ) : ''' Returns the location (a, b), that is a counter-clockwise rotation of spot (x, y) in a w x h image ''' x, y = spot a = ... b = ... return ( a, b ) def scale( spot, xs, ys ) : ''' Returns a new location (a, b), that is ... ''' x, y = spot a = ... b = ... a, b = int( a ), int( b ) return ( a, b )