emacs-framebuffer

Emacs library to show images and documents in console using Linux framebuffer
Log | Files | Refs

commit 6c7cede532498801ab552e6f99e415ef38029f6b
parent f8604b15301076d92d24c52d651d3f73847d6508
Author: Tomas Hlavaty <tom@logand.com>
Date:   Sun, 30 Aug 2020 14:15:31 +0200

position images properly

Diffstat:
Memacs-framebuffer.el | 14+++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/emacs-framebuffer.el b/emacs-framebuffer.el @@ -405,13 +405,13 @@ (:fit-height (/ wh 1.0 h)))) (zw (floor (* scale w))) (zh (floor (* scale h))) - (zx (+ wx (floor (- ww zw) 2))) - (zy (+ wy (floor (- wh zh) 2)))) - (when (minusp zx) - (setq zx 0)) - (when (minusp zy) - (setq zy 0)) - (framebuffer-draw zx zy zw zh wx wy ww wh file)))))))) + (zx (+ wx (max 0 (floor (- ww zw) 2)))) + (zy (+ wy (max 0 (floor (- wh zh) 2)))) + (sx 0) + (sy 0) + (sw ww) + (sh wh)) + (framebuffer-draw zx zy zw zh sx sy sw sh file)))))))) (defun framebuffer-image-mode-draw-image-repeatedly (buffer) (when (buffer-live-p buffer)