''' Module locate: provides support for locating the spot for a pixel grab ''' def iso( spot, w, h ) : ''' Returns a new location (x, y), where x, and y are the two coordinates of spot ''' x, y = spot return ( x, y ) def mirror( spot, w, h ) : ''' Returns a new location (a, b), that is the x-axis mirroring of location spot (x, y) in a w x h image ''' x, y = spot a, b = (w - 1) - x, y return (a, b) def flip( p, w, h ) : ''' Returns a new location (a, b), that is the y-axis flipping of location spot (x, y) in a w x h image ''' x, y = spot a, b = x, (h - 1) - y return (a, b) def ccw( p, w, h ) : ''' Returns a new location (a, b), that is a counter-clockwise rotation of spot (x, y) in a w x h image ''' pass