示例#1
0
 def get_stroke_list(R, use_salience=False):
     paint.pave_the_canvas(width, height)
     canvas = paint.get_current_canvas(width, height)
     if use_salience:
         salience = reference_image.get_salient_reference(src_img)
         ref = src_img
     else:
         salience = None
         ref = reference_image.get_gaussian_reference(src_img, R)
         
     stroke_list_tmp = paint.paint(ref, canvas, radius=R, painting_area=salience)
     #stroke_list_tmp = paint.sort_stroke(stroke_list_tmp)
     stroke_list.extend(stroke_list_tmp)
     glutPostRedisplay()
示例#2
0
 def single_stroke_test(texture = False):
     paint.pave_the_canvas(width, height)
     strk = stroke.stroke(30, (30, 30), (0, 255, 0))
     strk.add_control_point((100, 100))
     strk.add_control_point((200, 100))
     stroke_list.append(strk)