def patternswitcher(target, guitoggle): global o # first remove existing overlay: if 'o' in globals(): camera.remove_overlay(o) if guitoggle == 1: creategui(gui) # cycle through possible patterns: if curpat2 == 1: patterns.pattern1(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 2: patterns.pattern2(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 3: patterns.pattern3(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 4: patterns.pattern4(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 5: patterns.pattern5(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 6: patterns.pattern6(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 7: patterns.pattern7(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 8: patterns.pattern8(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 9: patterns.pattern9(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 10: patterns.pattern10(target, width, height, xcenter, ycenter, radius, col) # Add the overlay directly into layer 3 with transparency; # we can omit the size parameter of add_overlay as the # size is the same as the camera's resolution o = camera.add_overlay(np.getbuffer(target), layer=3, alpha=160) return
def patternswitcher(target,guitoggle): global o # first remove existing overlay: if 'o' in globals(): camera.remove_overlay(o) if guitoggle == 1: creategui(gui) # cycle through possible patterns: if curpat2 == 1: patterns.pattern1(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 2: patterns.pattern2(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 3: patterns.pattern3(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 4: patterns.pattern4(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 5: patterns.pattern5(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 6: patterns.pattern6(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 7: patterns.pattern7(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 8: patterns.pattern8(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 9: patterns.pattern9(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 10: patterns.pattern10(target, width, height, xcenter, ycenter, radius, col) # Add the overlay directly into layer 3 with transparency; # we can omit the size parameter of add_overlay as the # size is the same as the camera's resolution o = camera.add_overlay(np.getbuffer(target), layer=3, alpha=160) return
def zoompatternswitch(target,guitoggle): print "ASS" global o, gunRange, ycenter, alphaValue, counter, curpat2 # first remove existing overlay: if 'o' in globals(): camera.remove_overlay(o) # cycle through possible patterns: # if guitoggle == 1: # creategui(gui) ycenter = ycenter - (counter * 10) if(counter==10): print "nigger faggot10" ycenter = ycenter - 10 if(counter==11): print "nigger faggot11" ycenter = ycenter - 20 if(counter==12): print "nigger faggot12" ycenter = ycenter - 30 if(counter==13): print "nigger faggot13" ycenter = ycenter - 40 if curpat2 == 1: patterns.pattern1(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 2: patterns.pattern2(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 3: patterns.pattern3(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 4: patterns.pattern4(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 5: patterns.pattern5(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 6: patterns.pattern6(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 7: patterns.pattern7(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 8: patterns.pattern8(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 9: patterns.pattern9(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 10: patterns.pattern10(target, width, height, xcenter, ycenter, radius, col) o = camera.add_overlay(np.getbuffer(gui), layer=3, alpha=alphaValue) print "TESTSETSETSETSTETS" return
def patternswitcherZoomOut(target, guitoggle): global o, zoomcount, ycenter # first remove existing overlay: if 'o' in globals(): camera.remove_overlay(o) if guitoggle == 1: creategui(gui) if zooms['zoom_xy'] == zooms['zoom_xy_min']: print("zoom at min") else: ycenter = int(ycenter - int(math.fabs(zoomcount - 14)) / 2) if zoomcount == 0: ycenter = cdefaults.get('ycenter') # cycle through possible patterns: if curpat2 == 1: patterns.pattern1(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 2: patterns.pattern2(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 3: patterns.pattern3(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 4: patterns.pattern4(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 5: patterns.pattern5(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 6: patterns.pattern6(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 7: patterns.pattern7(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 8: patterns.pattern8(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 9: patterns.pattern9(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 10: patterns.pattern10(target, width, height, xcenter, ycenter, radius, col) if guitoggle == 1: creategui(gui) # Add the overlay directly into layer 3 with transparency; # we can omit the size parameter of add_overlay as the # size is the same as the camera's resolution o = camera.add_overlay(np.getbuffer(target), layer=3, alpha=alphaValue) return
def patternswitcherZoomIn(target, guitoggle): global o, zoomcount, ycenter # first remove existing overlay: if 'o' in globals(): camera.remove_overlay(o) if guitoggle == 1: creategui(gui) if zooms['zoom_xy'] == zooms['zoom_xy_max']: print("zoom at max") else: ycenter = ycenter + zoomcount # cycle through possible patterns: if curpat2 == 1: patterns.pattern1(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 2: patterns.pattern2(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 3: patterns.pattern3(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 4: patterns.pattern4(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 5: patterns.pattern5(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 6: patterns.pattern6(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 7: patterns.pattern7(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 8: patterns.pattern8(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 9: patterns.pattern9(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 10: patterns.pattern10(target, width, height, xcenter, ycenter, radius, col) if guitoggle == 1: creategui(gui) # Add the overlay directly into layer 3 with transparency; # we can omit the size parameter of add_overlay as the # size is the same as the camera's resolution o = camera.add_overlay(np.getbuffer(target), layer=3, alpha=alphaValue) #cv2.imwrite('/home/pi/messigray.png', np.getbuffer(gui)) return
def patternswitcherZoomOut(target,guitoggle): global o, zoomcount, ycenter # first remove existing overlay: if 'o' in globals(): camera.remove_overlay(o) if guitoggle == 1: creategui(gui) if zooms['zoom_xy'] == zooms['zoom_xy_min']: print("zoom at min") else: ycenter = int(ycenter - int(math.fabs(zoomcount - 14))/2) if zoomcount == 0: ycenter = cdefaults.get('ycenter') # cycle through possible patterns: if curpat2 == 1: patterns.pattern1(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 2: patterns.pattern2(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 3: patterns.pattern3(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 4: patterns.pattern4(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 5: patterns.pattern5(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 6: patterns.pattern6(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 7: patterns.pattern7(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 8: patterns.pattern8(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 9: patterns.pattern9(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 10: patterns.pattern10(target, width, height, xcenter, ycenter, radius, col) if guitoggle == 1: creategui(gui) # Add the overlay directly into layer 3 with transparency; # we can omit the size parameter of add_overlay as the # size is the same as the camera's resolution o = camera.add_overlay(np.getbuffer(target), layer=3, alpha=alphaValue) return
def patternswitcherZoomIn(target,guitoggle): global o, zoomcount, ycenter # first remove existing overlay: if 'o' in globals(): camera.remove_overlay(o) if guitoggle == 1: creategui(gui) if zooms['zoom_xy'] == zooms['zoom_xy_max']: print("zoom at max") else: ycenter = ycenter + zoomcount # cycle through possible patterns: if curpat2 == 1: patterns.pattern1(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 2: patterns.pattern2(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 3: patterns.pattern3(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 4: patterns.pattern4(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 5: patterns.pattern5(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 6: patterns.pattern6(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 7: patterns.pattern7(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 8: patterns.pattern8(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 9: patterns.pattern9(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 10: patterns.pattern10(target, width, height, xcenter, ycenter, radius, col) if guitoggle == 1: creategui(gui) # Add the overlay directly into layer 3 with transparency; # we can omit the size parameter of add_overlay as the # size is the same as the camera's resolution o = camera.add_overlay(np.getbuffer(target), layer=3, alpha=alphaValue) #cv2.imwrite('/home/pi/messigray.png', np.getbuffer(gui)) return
def patternswitch(target,guitoggle): global o, gunRange, ycenter, alphaValue # first remove existing overlay: if 'o' in globals(): camera.remove_overlay(o) # cycle through possible patterns: if guitoggle == 1: creategui(gui) if curpat == 1: ycenter = ycenter+10 if curpat2 == 1: patterns.pattern1(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 2: patterns.pattern2(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 3: patterns.pattern3(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 4: patterns.pattern4(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 5: patterns.pattern5(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 6: patterns.pattern6(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 7: patterns.pattern7(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 8: patterns.pattern8(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 9: patterns.pattern9(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 10: patterns.pattern10(target, width, height, xcenter, ycenter, radius, col) gunRange = 100 # creategui(gui) if curpat == 2: ycenter = ycenter+10 if curpat2 == 1: patterns.pattern1(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 2: patterns.pattern2(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 3: patterns.pattern3(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 4: patterns.pattern4(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 5: patterns.pattern5(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 6: patterns.pattern6(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 7: patterns.pattern7(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 8: patterns.pattern8(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 9: patterns.pattern9(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 10: patterns.pattern10(target, width, height, xcenter, ycenter, radius, col) gunRange = 110 # creategui(gui) if curpat == 3: ycenter = ycenter+10 if curpat2 == 1: patterns.pattern1(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 2: patterns.pattern2(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 3: patterns.pattern3(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 4: patterns.pattern4(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 5: patterns.pattern5(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 6: patterns.pattern6(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 7: patterns.pattern7(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 8: patterns.pattern8(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 9: patterns.pattern9(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 10: patterns.pattern10(target, width, height, xcenter, ycenter, radius, col) gunRange = 120 if curpat == 4: ycenter = ycenter+10 if curpat2 == 1: patterns.pattern1(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 2: patterns.pattern2(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 3: patterns.pattern3(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 4: patterns.pattern4(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 5: patterns.pattern5(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 6: patterns.pattern6(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 7: patterns.pattern7(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 8: patterns.pattern8(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 9: patterns.pattern9(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 10: patterns.pattern10(target, width, height, xcenter, ycenter, radius, col) gunRange = 30 if curpat == 5: ycenter = int(config.get('overlay', 'ycenter')) if curpat2 == 1: patterns.pattern1(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 2: patterns.pattern2(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 3: patterns.pattern3(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 4: patterns.pattern4(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 5: patterns.pattern5(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 6: patterns.pattern6(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 7: patterns.pattern7(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 8: patterns.pattern8(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 9: patterns.pattern9(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 10: patterns.pattern10(target, width, height, xcenter, ycenter, radius, col) gunRange = 40 if curpat == 6: ycenter = ycenter+10 if curpat2 == 1: patterns.pattern1(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 2: patterns.pattern2(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 3: patterns.pattern3(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 4: patterns.pattern4(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 5: patterns.pattern5(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 6: patterns.pattern6(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 7: patterns.pattern7(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 8: patterns.pattern8(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 9: patterns.pattern9(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 10: patterns.pattern10(target, width, height, xcenter, ycenter, radius, col) gunRange = 50 if curpat == 7: ycenter = ycenter+10 if curpat2 == 1: patterns.pattern1(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 2: patterns.pattern2(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 3: patterns.pattern3(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 4: patterns.pattern4(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 5: patterns.pattern5(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 6: patterns.pattern6(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 7: patterns.pattern7(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 8: patterns.pattern8(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 9: patterns.pattern9(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 10: patterns.pattern10(target, width, height, xcenter, ycenter, radius, col) gunRange = 60 if curpat == 8: ycenter = ycenter+8 if curpat2 == 1: patterns.pattern1(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 2: patterns.pattern2(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 3: patterns.pattern3(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 4: patterns.pattern4(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 5: patterns.pattern5(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 6: patterns.pattern6(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 7: patterns.pattern7(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 8: patterns.pattern8(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 9: patterns.pattern9(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 10: patterns.pattern10(target, width, height, xcenter, ycenter, radius, col) gunRange = 70 if curpat == 9: ycenter = ycenter+10 if curpat2 == 1: patterns.pattern1(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 2: patterns.pattern2(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 3: patterns.pattern3(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 4: patterns.pattern4(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 5: patterns.pattern5(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 6: patterns.pattern6(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 7: patterns.pattern7(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 8: patterns.pattern8(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 9: patterns.pattern9(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 10: patterns.pattern10(target, width, height, xcenter, ycenter, radius, col) gunRange = 80 if curpat == 10: ycenter = ycenter+10 if curpat2 == 1: patterns.pattern1(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 2: patterns.pattern2(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 3: patterns.pattern3(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 4: patterns.pattern4(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 5: patterns.pattern5(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 6: patterns.pattern6(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 7: patterns.pattern7(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 8: patterns.pattern8(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 9: patterns.pattern9(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 10: patterns.pattern10(target, width, height, xcenter, ycenter, radius, col) gunRange = 90 # Add the overlay directly into layer 3 with transparency; # we can omit the size parameter of add_overlay as the # size is the same as the camera's resolution o = camera.add_overlay(np.getbuffer(target), layer=3, alpha=alphaValue) return
def patternswitch(target, guitoggle): global o, gunRange, ycenter, alphaValue # first remove existing overlay: if 'o' in globals(): camera.remove_overlay(o) # cycle through possible patterns: if guitoggle == 1: creategui(gui) if curpat == 1: ycenter = ycenter + 10 if curpat2 == 1: patterns.pattern1(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 2: patterns.pattern2(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 3: patterns.pattern3(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 4: patterns.pattern4(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 5: patterns.pattern5(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 6: patterns.pattern6(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 7: patterns.pattern7(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 8: patterns.pattern8(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 9: patterns.pattern9(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 10: patterns.pattern10(target, width, height, xcenter, ycenter, radius, col) gunRange = 100 # creategui(gui) if curpat == 2: ycenter = ycenter + 10 if curpat2 == 1: patterns.pattern1(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 2: patterns.pattern2(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 3: patterns.pattern3(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 4: patterns.pattern4(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 5: patterns.pattern5(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 6: patterns.pattern6(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 7: patterns.pattern7(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 8: patterns.pattern8(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 9: patterns.pattern9(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 10: patterns.pattern10(target, width, height, xcenter, ycenter, radius, col) gunRange = 110 # creategui(gui) if curpat == 3: ycenter = ycenter + 10 if curpat2 == 1: patterns.pattern1(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 2: patterns.pattern2(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 3: patterns.pattern3(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 4: patterns.pattern4(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 5: patterns.pattern5(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 6: patterns.pattern6(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 7: patterns.pattern7(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 8: patterns.pattern8(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 9: patterns.pattern9(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 10: patterns.pattern10(target, width, height, xcenter, ycenter, radius, col) gunRange = 120 if curpat == 4: ycenter = ycenter + 10 if curpat2 == 1: patterns.pattern1(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 2: patterns.pattern2(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 3: patterns.pattern3(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 4: patterns.pattern4(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 5: patterns.pattern5(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 6: patterns.pattern6(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 7: patterns.pattern7(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 8: patterns.pattern8(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 9: patterns.pattern9(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 10: patterns.pattern10(target, width, height, xcenter, ycenter, radius, col) gunRange = 30 if curpat == 5: ycenter = int(config.get('overlay', 'ycenter')) if curpat2 == 1: patterns.pattern1(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 2: patterns.pattern2(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 3: patterns.pattern3(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 4: patterns.pattern4(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 5: patterns.pattern5(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 6: patterns.pattern6(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 7: patterns.pattern7(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 8: patterns.pattern8(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 9: patterns.pattern9(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 10: patterns.pattern10(target, width, height, xcenter, ycenter, radius, col) gunRange = 40 if curpat == 6: ycenter = ycenter + 10 if curpat2 == 1: patterns.pattern1(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 2: patterns.pattern2(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 3: patterns.pattern3(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 4: patterns.pattern4(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 5: patterns.pattern5(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 6: patterns.pattern6(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 7: patterns.pattern7(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 8: patterns.pattern8(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 9: patterns.pattern9(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 10: patterns.pattern10(target, width, height, xcenter, ycenter, radius, col) gunRange = 50 if curpat == 7: ycenter = ycenter + 10 if curpat2 == 1: patterns.pattern1(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 2: patterns.pattern2(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 3: patterns.pattern3(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 4: patterns.pattern4(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 5: patterns.pattern5(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 6: patterns.pattern6(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 7: patterns.pattern7(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 8: patterns.pattern8(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 9: patterns.pattern9(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 10: patterns.pattern10(target, width, height, xcenter, ycenter, radius, col) gunRange = 60 if curpat == 8: ycenter = ycenter + 8 if curpat2 == 1: patterns.pattern1(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 2: patterns.pattern2(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 3: patterns.pattern3(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 4: patterns.pattern4(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 5: patterns.pattern5(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 6: patterns.pattern6(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 7: patterns.pattern7(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 8: patterns.pattern8(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 9: patterns.pattern9(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 10: patterns.pattern10(target, width, height, xcenter, ycenter, radius, col) gunRange = 70 if curpat == 9: ycenter = ycenter + 10 if curpat2 == 1: patterns.pattern1(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 2: patterns.pattern2(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 3: patterns.pattern3(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 4: patterns.pattern4(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 5: patterns.pattern5(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 6: patterns.pattern6(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 7: patterns.pattern7(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 8: patterns.pattern8(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 9: patterns.pattern9(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 10: patterns.pattern10(target, width, height, xcenter, ycenter, radius, col) gunRange = 80 if curpat == 10: ycenter = ycenter + 10 if curpat2 == 1: patterns.pattern1(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 2: patterns.pattern2(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 3: patterns.pattern3(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 4: patterns.pattern4(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 5: patterns.pattern5(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 6: patterns.pattern6(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 7: patterns.pattern7(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 8: patterns.pattern8(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 9: patterns.pattern9(target, width, height, xcenter, ycenter, radius, col) if curpat2 == 10: patterns.pattern10(target, width, height, xcenter, ycenter, radius, col) gunRange = 90 # Add the overlay directly into layer 3 with transparency; # we can omit the size parameter of add_overlay as the # size is the same as the camera's resolution o = camera.add_overlay(np.getbuffer(target), layer=3, alpha=alphaValue) return