#NEWLINE# def on_touch_up( self , touch ) : #NEWLINE# #INDENT# g = simplegesture ( '' , list ( zip ( touch . ud [ 'line' ] . points [ : : 2 ] , touch . ud [ 'line' ] . points [ 1 : : 2 ] ) ) ) #NEWLINE# print ( 'gesture representation:' , self . gdb . gesture_to_str ( g ) ) #NEWLINE# print ( 'cross:' , g . get_score ( cross ) ) #NEWLINE# print ( 'check:' , g . get_score ( check ) ) #NEWLINE# print ( 'circle:' , g . get_score ( circle ) ) #NEWLINE# print ( 'square:' , g . get_score ( square ) ) #NEWLINE# g2 = self . gdb . find ( g , minscore = 0.7 ) #NEWLINE# print ( g ) #NEWLINE# if g2 : #NEWLINE# #INDENT# if ( g2 [ 1 ] == circle ) : #NEWLINE# #INDENT# print ( 'circle' ) #NEWLINE# #UNINDENT# if ( g2 [ 1 ] == square ) : #NEWLINE# #INDENT# print ( 'square' ) #NEWLINE# #UNINDENT# if ( g2 [ 1 ] == check ) : #NEWLINE# #INDENT# print ( 'check' ) #NEWLINE# #UNINDENT# if ( g2 [ 1 ] == cross ) : #NEWLINE# #INDENT# print ( 'cross' ) #NEWLINE# #UNINDENT# #UNINDENT# self . canvas . clear ( )