def draw_text(self, ctx):
ctx.select_font_face("Purisa", cairo.FONT_SLANT_NORMAL,
cairo.FONT_WEIGHT_NORMAL)
ctx.set_font_size(TXT_SIZE)
ctx.move_to(0.01*SIZE, 1.5*TXT_SIZE)
ctx.show_text(' Forearm: ' + str(int(degrees(forearm))))
ctx.move_to(0.01*SIZE, 3.5*TXT_SIZE)
ctx.show_text(' Hand: '+ str(int(degrees(-hand))))
if outOfReach:
ctx.set_source_rgb(1, 0, 0)
ctx.move_to(0.01*SIZE, 4*TXT_SIZE)
#ctx.show_text('OUT OF REACH !!!')
# ---------------------------------
# mouse_pressed
# ---------------------------------
评论列表
文章目录