コード例 #1
0
 def mouse_up(self, ips, x, y, btn, **key):
     if btn == 1 and (y, x) == self.pickp and key['ctrl']:
         x = int(round(min(max(x, 0), ips.img.shape[1])))
         y = int(round(min(max(y, 0), ips.img.shape[0])))
         ColorManager.set_front(ips.img[y, x])
     self.status = None
     ips.mark = None
     ips.update()
コード例 #2
0
 def on_color(self, event):
     ColorManager.set_front(self.btns.index(event.GetEventObject()))
コード例 #3
0
 def mouse_down(self, ips, x, y, btn, **key):
     if btn == 1: ColorManager.set_front(ips.img[int(y), int(x)])
     if btn == 3: ColorManager.set_back(ips.img[int(y), int(x)])
     print(ips.img[int(y), int(x)])
     print(ColorManager.get_front())
コード例 #4
0
 def config(self):
     ColorManager.set_front(self.para['front'])
     ColorManager.set_back(self.para['back'])