Function: artist-mouse-draw-1point
artist-mouse-draw-1point is an interactive and byte-compiled function
defined in artist.el.gz.
Signature
(artist-mouse-draw-1point EV)
Documentation
Generic function for shapes requiring only 1 point as input.
Operation is done once. The event, EV, is the mouse event.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/textmodes/artist.el.gz
(defun artist-mouse-draw-1point (ev)
"Generic function for shapes requiring only 1 point as input.
Operation is done once. The event, EV, is the mouse event."
(interactive "@e")
(let* ((unshifted (artist-go-get-symbol-shift artist-curr-go nil))
(shifted (artist-go-get-symbol-shift artist-curr-go t))
(shift-state (artist-event-is-shifted ev))
(op (if shift-state shifted unshifted))
(init-fn (artist-go-get-init-fn-from-symbol op))
(prep-fill-fn (artist-go-get-prep-fill-fn-from-symbol op))
(exit-fn (artist-go-get-exit-fn-from-symbol op))
(draw-fn (artist-go-get-draw-fn-from-symbol op))
(arrow-pred (artist-go-get-arrow-pred-from-symbol op))
(arrow-set-fn (artist-go-get-arrow-set-fn-from-symbol op))
(ev-start (event-start ev))
(ev-start-pos (artist-coord-win-to-buf (posn-col-row ev-start)))
(x1 (artist--adjust-x (car ev-start-pos)))
(y1 (cdr ev-start-pos)))
(select-window (posn-window ev-start))
(artist-funcall init-fn x1 y1)
(artist-funcall draw-fn x1 y1)
(artist-funcall prep-fill-fn x1 y1)
(if (artist-funcall arrow-pred)
(artist-funcall arrow-set-fn x1 y1)
(artist-clear-arrow-points))
(artist-funcall exit-fn x1 y1)
(artist-move-to-xy x1 y1)))