MCPcopy Create free account
hub / github.com/Image-Py/imagepy / on_rdc

Method on_rdc

imagepy/ui/widgets/cmappanel.py:87–101  ·  view source on GitHub ↗
(self, event)

Source from the content-addressed store, hash-verified

85 self.handle()
86
87 def on_rdc(self, event):
88 x,y = event.GetX()-self.offset[0], event.GetY()-self.offset[1]
89 self.idx = self.pick(x, y)
90 if self.idx==-1:return
91 dialog = wx.ColourDialog(self)
92 dialog.GetColourData().SetChooseFull(True)
93 if dialog.ShowModal() == wx.ID_OK:
94 rst = dialog.GetColourData().GetColour()
95 x = self.pts[self.idx][0]
96 self.pts[self.idx] = (x,)+rst[:-1]
97 self.idx=-1
98 self.cmap[:] = self.linear_color(self.pts)
99 self.update()
100 dialog.Destroy()
101 self.handle()
102
103
104 def on_mv(self, event):

Callers

nothing calls this directly

Calls 4

pickMethod · 0.95
linear_colorMethod · 0.95
updateMethod · 0.95
handleMethod · 0.45

Tested by

no test coverage detected