Function: artist-cut-square

artist-cut-square is a byte-compiled function defined in artist.el.gz.

Signature

(artist-cut-square SQUARE X1 Y1 X2 Y2)

Documentation

Copy a SQUARE drawn from X1, Y1 to X2, Y2 (made square), then clears it.

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/artist.el.gz
(defun artist-cut-square (square x1 y1 x2 y2)
  "Copy a SQUARE drawn from X1, Y1 to X2, Y2 (made square), then clears it."
  (artist-undraw-square square)
  (let* ((square-corners (artist-rect-corners-squarify x1 y1 x2 y2))
	 (new-x1 (elt square-corners 0))
	 (new-y1 (elt square-corners 1))
	 (new-x2 (elt square-corners 2))
	 (new-y2 (elt square-corners 3)))
    (artist-copy-generic new-x1 new-y1 new-x2 new-y2)
    (artist-erase-rect square new-x1 new-y1 new-x2 new-y2)))