enable.drawing.drag_polygon module

A drag drawn polygon.

class enable.drawing.drag_polygon.DragPolygon(**traits)[source]

Bases: enable.drawing.drawing_tool.DrawingTool

A drag drawn polygon.

complete_draw(gc)[source]

Draw the completed polygon.

complete_left_down(event)[source]

Draw a new polygon.

complete_right_down(event)[source]

Do the context menu if available.

drawing_draw(gc)[source]

Draw the polygon while in ‘drawing’ state.

drawing_left_up(event)[source]

Handle the left mouse button coming up in ‘drawing’ state.

drawing_mouse_move(event)[source]

Handle the mouse moving in ‘drawing’ state.

normal_left_down(event)[source]

Handle the left button down in the ‘normal’ state.

normal_mouse_move(event)[source]

Handle the mouse moving in the ‘normal’ state.

reset()[source]

Causes the tool to reset any saved state and revert its event_state back to the initial value (usually “normal”).