Esempio n. 1
0
def test_base_tool():
    img = data.moon()
    viewer = ImageViewer(img)

    tool = CanvasToolBase(viewer)
    tool.set_visible(False)
    tool.set_visible(True)

    do_event(viewer, 'key_press', key='enter')

    tool.redraw()
    tool.remove()

    tool = CanvasToolBase(viewer, useblit=False)
    tool.redraw()
Esempio n. 2
0
def test_base_tool():
    img = data.moon()
    viewer = ImageViewer(img)

    tool = CanvasToolBase(viewer)
    tool.set_visible(False)
    tool.set_visible(True)

    do_event(viewer, 'key_press', key='enter')

    tool.redraw()
    tool.remove()

    tool = CanvasToolBase(viewer, useblit=False)
    tool.redraw()
Esempio n. 3
0
def test_base_tool():
    img = data.moon()
    viewer = ImageViewer(img)

    tool = CanvasToolBase(viewer.ax)
    tool.set_visible(False)
    tool.set_visible(True)

    enter = create_mouse_event(viewer.ax, key='enter')
    tool._on_key_press(enter)

    tool.redraw()
    tool.remove()

    tool = CanvasToolBase(viewer.ax, useblit=False)
    tool.redraw()
Esempio n. 4
0
def test_base_tool():
    img = data.moon()
    viewer = ImageViewer(img)

    tool = CanvasToolBase(viewer.ax)
    tool.set_visible(False)
    tool.set_visible(True)

    enter = create_mouse_event(viewer.ax, key='enter')
    tool._on_key_press(enter)

    tool.redraw()
    tool.remove()

    tool = CanvasToolBase(viewer.ax, useblit=False)
    tool.redraw()