def redraw_overplot_on_image(self, msg=None):
if self.primary_image_patch is not None:
self.ztv_frame.primary_image_panel.axes.patches.remove(self.primary_image_patch)
if self.start_pt == self.end_pt:
path = Path([self.start_pt, self.start_pt + (0.5, 0.),
self.start_pt, self.start_pt + (-0.5, 0.),
self.start_pt, self.start_pt + (0., 0.5),
self.start_pt, self.start_pt + (0., -0.5), self.start_pt],
[Path.MOVETO, Path.LINETO, Path.LINETO, Path.LINETO, Path.LINETO,
Path.LINETO, Path.LINETO, Path.LINETO, Path.LINETO])
else:
path = Path([self.start_pt, self.end_pt], [Path.MOVETO, Path.LINETO])
self.primary_image_patch = PathPatch(path, color='magenta', lw=1)
self.ztv_frame.primary_image_panel.axes.add_patch(self.primary_image_patch)
self.ztv_frame.primary_image_panel.figure.canvas.draw()
self.hideshow_button.SetLabel(u"Hide")
评论列表
文章目录