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

Method draw

imagepy/core/roi/rectangleroi.py:84–92  ·  view source on GitHub ↗
(self, dc, f, **key)

Source from the content-addressed store, hash-verified

82 '''
83
84 def draw(self, dc, f, **key):
85 dc.SetPen(wx.Pen(RoiManager.get_color(), width=RoiManager.get_lw(), style=wx.SOLID))
86 if(len(self.body)>1):
87 dc.DrawLines([f(*i) for i in self.body])
88 for i in self.body:dc.DrawCircle(f(*i),2)
89 dc.DrawCircle(f(self.lt, (self.tp+self.bm)/2),2)
90 dc.DrawCircle(f(self.rt, (self.tp+self.bm)/2),2)
91 dc.DrawCircle(f((self.lt+self.rt)/2, self.tp),2)
92 dc.DrawCircle(f((self.lt+self.rt)/2, self.bm),2)
93
94 def sketch(self, img, w=1, color=None):
95 pen = paint.Paint()

Callers

nothing calls this directly

Calls 3

get_lwMethod · 0.80
fFunction · 0.50
get_colorMethod · 0.45

Tested by

no test coverage detected