Function: artist-pen-line

artist-pen-line is a byte-compiled function defined in artist.el.gz.

Signature

(artist-pen-line X1 Y1)

Documentation

Draw a line from last pen position to X1, Y1.

The character is replaced with the character in artist-fill-char. This will store all points in artist-key-poly-point-list in reversed order (I assume it is faster to cons to the beginning of the list than to append to the end of the list, when doing free-hand drawing).

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/artist.el.gz
(defun artist-pen-line (x1 y1)
  "Draw a line from last pen position to X1, Y1.
The character is replaced with the character in `artist-fill-char'.
This will store all points in `artist-key-poly-point-list' in reversed
order (I assume it is faster to cons to the beginning of the list than
to append to the end of the list, when doing free-hand drawing)."
  (let ((artist-line-char (if artist-line-char-set
			      artist-line-char
			    (if artist-fill-char-set
				artist-fill-char
			      artist-default-fill-char))))

    ;; Draw line from last point to this
    (let ((x-last (car (car artist-key-poly-point-list)))
	  (y-last (cdr (car artist-key-poly-point-list))))
      (artist-move-to-xy x-last y-last)
      (artist-replace-char artist-line-char)
      (artist-draw-line x-last y-last x1 y1))

    ;; Update the point-list
    (setq artist-key-poly-point-list
	  (cons (cons x1 y1) artist-key-poly-point-list))))