[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to Display a Zero Height Line
From: |
Psionic K |
Subject: |
Re: How to Display a Zero Height Line |
Date: |
Wed, 4 Dec 2024 14:08:16 +0900 |
> I think currently, you won't be able to get down to actual zero *except*
> by making that line `invisible`.
It is appropriate to merely get "pretty close" to zero, a pixel or so.
In animation, as long as the final height is quite small, it appears
to smoothly vanish on the final frame.
Regarding Eli's reply:
> What do you mean by "extending the background of :inverse-video
> background" of a line? Can you show some simple Lisp which produces
> this effect on display?
(let ((buffer (get-buffer-create "testorito")))
(set-buffer buffer)
(erase-buffer)
(insert "* ")
(insert (propertize "TODO" 'face '(:inverse-video t)))
(insert " Org Modern Uses Inverse Video")
(insert "\n")
(insert "* ")
(insert (propertize "TODO" 'face '(:inverse-video t :foreground
"#ff2222")))
(insert " To Draw Fancy Todos")
(setq-local p (point-max))
(insert "\n")
(setq-local o (make-overlay p (1+ p)))
(overlay-put o 'line-height 4.0)
(switch-to-buffer buffer))
This example re-creates the situation that exists in Dslide. I need
to separate the two lines by some floating point multiple of lines in
order to "slide in" to a vanishing degree of separation between two
lines of content. I use the same technique between list items and
sub-headings. All text that has a background exhibits the behavior,
not just `:inverse-video`.