Example #1
0
def test_process_marks():
    marks= {'a':longitude(mark.dirs.BOTH, 300),
            'b':segment(mark.dirs.BOTH, spherical_coord(10, 30, 320),
              spherical_coord(10, 20,300)),
            'c':list_mark(longitude(mark.dirs.LEFT, 0),
                          longitude(mark.dirs.LEFT, 120),
                          longitude(mark.dirs.LEFT, 240)),
            'd':series_mark(longitude(mark.dirs.RIGHT, 60),
                            longitude(mark.dirs.RIGHT, 180),
                            longitude(mark.dirs.RIGHT, 300))}    
    x=bp_display(marks)
    proctest(x, 'a')
    proctest(x, 'b')
    proctestlist(x, 'c')
    proctestlist(x, 'd')
Example #2
0
 def __init__(self, mdict=marks):
     ''' load sets,  set them up for display, turn them off initially '''
     self.all_marks=mdict
     self.active_marks={}
     self.view =bp_display(self.all_marks) 
     self.active_disp=self.view.active_disp
     self.all_disp=self.view.all_disp
     self.mark_buttons={}
     self.ctrl_window = controls.controls(x=600, y=0,
                                 height=50+50*
                                        len(self.all_marks),
                                 width=350)
     for i, j in enumerate(self.all_marks.keys()):
         act= self.set_button(j)
         self.mark_buttons[j]=button(text=j+' on', pos=(0,25*(i-1)),
                                   width=80, height=30,
                                   action=act)
         self.calibrate_button=button(pos=(0,-50), width=80, height=30,
                                      text='set',
                                      action = lambda: self.calibrate())
     while(True):
         rate(20)
         self.ctrl_window.interact()