commit f8604b15301076d92d24c52d651d3f73847d6508
parent 7de2d816d7dc5db442b744f98c321396ab39c054
Author: Tomas Hlavaty <tom@logand.com>
Date: Sun, 30 Aug 2020 13:02:56 +0200
clean up
Diffstat:
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/emacs-framebuffer.el b/emacs-framebuffer.el
@@ -143,7 +143,7 @@
(call-process "pdftocairo" nil nil nil "-singlefile" "-f" page "-l" page "-png" (expand-file-name file) output))
ofile))
-(defun framebuffer-draw-now (x1 y1 w1 h1 x2 y2 w2 h2 file)
+(defun framebuffer-draw (x y w h sx sy sw sh file)
(let ((format (framebuffer-file-format file)))
(case format
((abw odt rtf doc docx)
@@ -154,14 +154,11 @@
file
framebuffer-image-mode-current-page))))
(with-temp-buffer
- (insert (format "0;1;%d;%d;%d;%d;%s;%s;%s;%s;%s\n" x1 y1 w1 h1
- (or x2 "") (or y2 "") (or w2 "") (or h2 "")
+ (insert (format "0;1;%d;%d;%d;%d;%s;%s;%s;%s;%s\n" x y w h
+ (or sx "") (or sy "") (or sw "") (or sh "")
(expand-file-name file)))
(call-process-region (point-min) (point-max) "w3mimgdisplay")))
-(defun framebuffer-draw (x y w h file)
- (framebuffer-draw-now x y w h nil nil nil nil file))
-
(defun framebuffer-buffer-brook ()
(lambda ()
(let ((z (char-after)))
@@ -347,7 +344,7 @@
(hh (floor (* scale h)))
(xx (floor (- fw ww) 2))
(yy (floor (- fh hh) 2)))
- (framebuffer-draw xx yy ww hh file)))))
+ (framebuffer-draw xx yy ww hh nil nil nil nil file)))))
(defun framebuffer-image-buffer ()
(interactive)
@@ -414,7 +411,7 @@
(setq zx 0))
(when (minusp zy)
(setq zy 0))
- (framebuffer-draw-now zx zy zw zh wx wy ww wh file))))))))
+ (framebuffer-draw zx zy zw zh wx wy ww wh file))))))))
(defun framebuffer-image-mode-draw-image-repeatedly (buffer)
(when (buffer-live-p buffer)