Function: artist-spray
artist-spray is a byte-compiled function defined in artist.el.gz.
Signature
(artist-spray X1 Y1)
Documentation
Spray at X1, Y1.
Source Code
;; Defined in /usr/src/emacs/lisp/textmodes/artist.el.gz
(defun artist-spray (x1 y1)
"Spray at X1, Y1."
(let* ((num-points (* artist-spray-radius artist-spray-radius))
(spray-points (artist-spray-random-points num-points
artist-spray-radius)))
(while spray-points
;; Replace one spray point
(let* ((point (car spray-points))
(x (+ x1 (car point)))
(y (+ y1 (cdr point)))
(buf-c (artist-get-char-at-xy-conv x y))
(this-c (memq buf-c artist-spray-chars))
(next-c (cond ((null this-c) artist-spray-new-char)
((null (cdr this-c)) (car this-c))
(t (car (cdr this-c))))))
(artist-move-to-xy x y)
(artist-replace-char next-c))
;; Step to next spray point
(setq spray-points (cdr spray-points)))))