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

Class Cross

imagepy/menus/Image/Stack/orthogonal_plg.py:13–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11from imagepy.core.engine import Tool, Simple
12
13class Cross:
14 def __init__(self, w, h):
15 self.w, self.h = w, h
16 self.x, self.y = -1, -1
17
18 def set_xy(self, x, y):
19 if x!=None:self.x=x
20 if y!=None:self.y=y
21
22 def draw(self, dc, f):
23 print(self.x, self.y)
24 dc.SetPen(wx.Pen((255,255,0), width=1, style=wx.SOLID))
25 dc.DrawLines([f(0,self.y),f(self.w,self.y)])
26 dc.DrawLines([f(self.x,0),f(self.x,self.h)])
27
28class Orthogonal(Tool):
29 title = 'Orthogonal View'

Callers 1

mouse_downMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected