1367 |
(let ((char (or (car rainbow-chars) ?\.))) |
(let ((char (or (car rainbow-chars) ?\.))) |
1368 |
(loop for i from 0 to 2 do |
(loop for i from 0 to 2 do |
1369 |
(loop for j from 0 to 2 do |
(loop for j from 0 to 2 do |
1370 |
(goto-line (+ 16 i y)) |
(goto-line (+ 16 i y)) |
1371 |
(forward-char (+ 1 j x)) |
(forward-char (+ 1 j x)) |
1372 |
(delete-char 1) |
(delete-char 1) |
1373 |
(insert char))) |
(insert char))) |
1374 |
(setq rainbow-chars (cdr rainbow-chars) |
(setq rainbow-chars (cdr rainbow-chars) |
1375 |
lift-flag nil)) |
lift-flag nil)) |
1376 |
;; Otherwise, just plot the point... |
;; Otherwise, just plot the point... |
1377 |
(goto-line (+ 17 y)) |
(goto-line (+ 17 y)) |
1378 |
(forward-char (+ 2 x)) |
(forward-char (+ 2 x)) |
1379 |
(subst-char-in-region (point) (1+ (point)) ?\ ?\*))) |
(subst-char-in-region (point) (1+ (point)) ?\ ?\*))) |
1380 |
((strokes-lift-p point) |
((strokes-lift-p point) |
1381 |
;; a lift--tell the loop to X out the next point... |
;; a lift--tell the loop to X out the next point... |
1596 |
(global-unset-key [(meta down-mouse-2)])) |
(global-unset-key [(meta down-mouse-2)])) |
1597 |
(if (string-match "^strokes-" (symbol-name (key-binding [(control down-mouse-2)]))) |
(if (string-match "^strokes-" (symbol-name (key-binding [(control down-mouse-2)]))) |
1598 |
(global-unset-key [(control down-mouse-2)])) |
(global-unset-key [(control down-mouse-2)])) |
1599 |
;; (if (string-match "^strokes-" (symbol-name (key-binding [(shift button2)]))) |
;; (if (string-match "^strokes-" (symbol-name (key-binding [(shift button2)]))) |
1600 |
;; (global-unset-key [(shift button2)])) |
;; (global-unset-key [(shift button2)])) |
1601 |
(ad-deactivate-regexp "^strokes-") ; unadvise strokes-button2 commands |
(ad-deactivate-regexp "^strokes-") ; unadvise strokes-button2 commands |
1602 |
(setq strokes-mode nil)))) |
(setq strokes-mode nil)))) |
1712 |
;; (eq (null a) (not (null b)))) |
;; (eq (null a) (not (null b)))) |
1713 |
|
|
1714 |
(defsubst strokes-xpm-encode-length-as-string (length) |
(defsubst strokes-xpm-encode-length-as-string (length) |
1715 |
"Given some LENGTH in [0,62) do a fast lookup of it's encoding." |
"Given some LENGTH in [0,62) do a fast lookup of its encoding." |
1716 |
(aref strokes-base64-chars length)) |
(aref strokes-base64-chars length)) |
1717 |
|
|
1718 |
(defsubst strokes-xpm-decode-char (character) |
(defsubst strokes-xpm-decode-char (character) |
1719 |
"Given a CHARACTER, do a fast lookup to find its corresponding integer value." |
"Given a CHARACTER, do a fast lookup to find its corresponding integer value." |
1720 |
(aref strokes-char-table character)) |
(aref strokes-char-table character)) |
1721 |
|
|
1722 |
(defun strokes-xpm-to-compressed-string (&optional xpm-buffer) |
(defun strokes-xpm-to-compressed-string (&optional xpm-buffer) |
1723 |
"Convert the xpm in XPM-BUFFER into a compressed string representing the stroke. |
"Convert the xpm in XPM-BUFFER into a compressed string representing the stroke. |
1724 |
XPM-BUFFER is an optional argument, and defaults to `*strokes-xpm*'." |
XPM-BUFFER is an optional argument, and defaults to `*strokes-xpm*'." |
1743 |
;; check to see if the `char-at-point' is an actual pixmap bit |
;; check to see if the `char-at-point' is an actual pixmap bit |
1744 |
(when (strokes-xpm-char-bit-p char-at-point) |
(when (strokes-xpm-char-bit-p char-at-point) |
1745 |
(setq count 1 |
(setq count 1 |
1746 |
current-char-is-on-p (strokes-xpm-char-on-p char-at-point))) |
current-char-is-on-p (strokes-xpm-char-on-p char-at-point))) |
1747 |
(forward-char 1)) |
(forward-char 1)) |
1748 |
((= count 61) ; maximum single char's |
((= count 61) ; maximum single char's |
1749 |
; encoding length |
; encoding length |