enable.drawing.point_polygon module

A point-to-point drawn polygon.

class enable.drawing.point_polygon.PointPolygon(**traits)[source]

Bases: enable.drawing.drawing_tool.DrawingTool

A point-to-point drawn polygon.

complete_draw(gc)[source]

Draw a closed polygon.

complete_left_down(event)[source]

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

complete_mouse_move(event)[source]

Handle the mouse moving in the ‘complete’ state.

drag_point_draw(gc)[source]

Draw the polygon in the ‘drag_point’ state.

drag_point_left_up(event)[source]

Handle the left mouse coming up in the ‘drag_point’ state.

drag_point_mouse_move(event)[source]

Handle the mouse moving in the ‘drag_point’ state.

incomplete_draw(gc)[source]

Draw the polygon in the ‘incomplete’ state.

incomplete_left_dclick(event)[source]

Handle a left double-click in the incomplete state.

incomplete_left_up(event)[source]

Handle the left mouse button coming up in incomplete state.

incomplete_mouse_move(event)[source]

Handle the mouse moving in incomplete state.

normal_left_up(event)[source]

Handle the left button up 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”).