enable.drawing.drawing_tool module

class enable.drawing.drawing_tool.DrawingTool(**traits)[source]

Bases: enable.component.Component

A drawing tool is just a component that also defines a certain drawing mode so that its container knows how to render it and pass control to it.

The DrawingTool base class also defines a draw() dispatch, so that different draw methods are called depending on the event state of the tool.

complete_left_down(event)[source]

Default function that causes the tool to reset if the user starts drawing again.

request_redraw()[source]

Requests that the component redraw itself. Usually this means asking its parent for a repaint.

reset()[source]

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