#NEWLINE# def draw_label( self , angle , label , draw_handler ) : #NEWLINE# #INDENT# assert label #NEWLINE# assert draw_handler #NEWLINE# angle = ( ( angle + 360 ) % 360 ) #NEWLINE# color = ( 100 , 100 , 100 ) #NEWLINE# radian_angle = ( ( angle / 180.0 ) * mod_math . pi ) #NEWLINE# x = mod_math . sin ( radian_angle ) #NEWLINE# y = mod_math . cos ( radian_angle ) #NEWLINE# x_from = x #NEWLINE# y_from = y #NEWLINE# x_to = ( x * 1.1 ) #NEWLINE# y_to = ( y * 1.1 ) #NEWLINE# draw_handler . draw_line ( x_from , y_from , x_to , y_to , color ) #NEWLINE# if ( angle < 180 ) : #NEWLINE# #INDENT# draw_handler . draw_line ( x_to , y_to , ( x_to + 0.3 ) , y_to , color ) #NEWLINE# if ( ( angle < 90 ) or ( angle > 270 ) ) : #NEWLINE# #INDENT# draw_handler . draw_text ( x_to , y_to , label , ( 0 , 0 , 0 ) , mod_main . RIGHT_UP ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# draw_handler . draw_text ( x_to , y_to , label , ( 0 , 0 , 0 ) , mod_main . RIGHT_DOWN ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# draw_handler . draw_line ( x_to , y_to , ( x_to - 0.3 ) , y_to , color ) #NEWLINE# if ( ( angle < 90 ) or ( angle > 270 ) ) : #NEWLINE# #INDENT# draw_handler . draw_text ( x_to , y_to , label , ( 0 , 0 , 0 ) , mod_main . LEFT_UP ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# draw_handler . draw_text ( x_to , y_to , label , ( 0 , 0 , 0 ) , mod_main . LEFT_DOWN )