| 11 | from imagepy.core.engine import Tool, Simple |
| 12 | |
| 13 | class 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 | |
| 28 | class Orthogonal(Tool): |
| 29 | title = 'Orthogonal View' |