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

Method __init__

imagepy/ui/widgets/cmappanel.py:10–29  ·  view source on GitHub ↗
(self, parent )

Source from the content-addressed store, hash-verified

8class CMapPanel(wx.Panel):
9 """ HistCanvas: diverid from wx.core.Panel """
10 def __init__(self, parent ):
11 wx.Panel.__init__ ( self, parent, id = wx.ID_ANY,
12 pos = wx.DefaultPosition, size = wx.Size(255,30),
13 style = wx.TAB_TRAVERSAL )
14 self.init_buf()
15 self.offset = (0,0)
16 self.cmap = np.vstack([np.arange(256)]*3).T.astype(np.uint8)
17 self.idx = -1
18 self.his = None
19 self.dirty = False
20 self.pts = [(0,0,0,0), (255,255,255,255)]
21 self.Bind(wx.EVT_SIZE, self.on_size)
22 self.Bind(wx.EVT_IDLE, self.on_idle)
23 self.Bind(wx.EVT_PAINT, self.on_paint)
24 self.Bind(wx.EVT_LEFT_DOWN, self.on_ld)
25 self.Bind( wx.EVT_LEFT_UP, self.on_lu )
26 self.Bind( wx.EVT_MOTION, self.on_mv )
27 self.Bind( wx.EVT_RIGHT_DOWN, self.on_rd )
28 self.Bind( wx.EVT_LEFT_DCLICK, self.on_rdc )
29 self.handle = self.handle_
30
31 def update(self): self.dirty = True
32

Callers

nothing calls this directly

Calls 2

init_bufMethod · 0.95
BindMethod · 0.45

Tested by

no test coverage detected