| 66 | ips.update() |
| 67 | |
| 68 | def mouse_move(self, ips, x, y, btn, **key): |
| 69 | if ips.roi==None:return |
| 70 | lim = 5.0/key['canvas'].get_scale() |
| 71 | if btn==None: |
| 72 | self.cursor = wx.CURSOR_CROSS |
| 73 | if ips.roi.snap(x, y, ips.cur, lim)!=None: |
| 74 | self.cursor = wx.CURSOR_HAND |
| 75 | elif btn==1: |
| 76 | if ips.roi.dtype == 'polygon' and self.doing: |
| 77 | l,b,r,t = self.ox, self.oy, x, y |
| 78 | self.helper.buf = [[(l,b),(r,b),(r,t),(l,t),(l,b)],[]] |
| 79 | if self.curobj: ips.roi.draged(self.odx, self.ody, x, y, ips.cur, self.curobj) |
| 80 | ips.update() |
| 81 | self.odx, self.ody = x, y |
| 82 | |
| 83 | def mouse_wheel(self, ips, x, y, d, **key): |
| 84 | pass |