(self, event)
| 102 | |
| 103 | |
| 104 | def on_mv(self, event): |
| 105 | x,y = event.GetX()-self.offset[0], event.GetY()-self.offset[1] |
| 106 | if self.pick(x, y)!=-1: |
| 107 | self.SetCursor(wx.Cursor(wx.CURSOR_HAND)) |
| 108 | else: self.SetCursor(wx.Cursor(wx.CURSOR_ARROW)) |
| 109 | if self.idx!=-1: |
| 110 | oldx = self.pts[self.idx][0] |
| 111 | if oldx == 0: x=0 |
| 112 | elif oldx==255: x=255 |
| 113 | else: x = np.clip(x, 1, 254) |
| 114 | cl = self.pts[self.idx][1:] |
| 115 | self.pts[self.idx] = (x,)+cl |
| 116 | self.cmap[:] = self.linear_color(self.pts) |
| 117 | self.update() |
| 118 | self.handle() |
| 119 | |
| 120 | |
| 121 | def on_paint(self, event): |
nothing calls this directly
no test coverage detected