knots.editor.KnotInteractor#
- class knots.editor.KnotInteractor(fig: Figure, points: Sequence[tuple[Pt, float]], scale: float = 0.3, width=7, reflect_func=None)[source]#
Bases:
objectA path editor.
Press ‘t’ to toggle vertex markers on and off. When vertex markers are on, they can be dragged with the mouse.
- __init__(fig: Figure, points: Sequence[tuple[Pt, float]], scale: float = 0.3, width=7, reflect_func=None)[source]#
Methods
__init__(fig, points[, scale, width, ...])generate_knot()get_ind_under_point(event)Return the index of the point closest to the event position or None if no point is within
self.epsilonto the event position.on_button_press(event)Callback for mouse button presses.
on_button_release(event)Callback for mouse button releases.
on_draw(event)Callback for draws.
on_key_press(event)Callback for key presses.
on_mouse_move(event)Callback for mouse movements.
Attributes
epsilonknotshowverts