* draw line
@ 2008-03-19 21:00 Jonas Bernoulli
2008-03-20 7:19 ` David Hansen
2008-03-20 16:20 ` Kim F. Storm
0 siblings, 2 replies; 4+ messages in thread
From: Jonas Bernoulli @ 2008-03-19 21:00 UTC (permalink / raw)
To: help-gnu-emacs
I would like to draw a one-pixel line. I have tried quite a few things
by now but none of them works.
Here are two ways I have tried. Evaluating them should draw a red line
on the next line, which is only one pixel high.
(insert (concat "\n" (propertize "\n" 'face '(:background "red")
'display '(space :height (1)))))
(insert (concat "\n" (propertize "\n" 'face '(:background "red")
'line-height 1)))
This doesn't sound very promissing:
38.11 Line Height
... However, no matter what you specify, the actual line height can
never be less than the default. ...
But I know that some time ago I managed to draw a one-pixel line. I
just don't remember how I did it. So I don't know if I just can't come
up with the proper way of doing it anymore or if this is just not
possible anymore in 23.0. I have tried the expressions above with 22.1
without success also. But I don't know if I used 21 or 22 back when I
managed to draw a one-pixel line.
Anyways, does anyone know of a way to draw a line?
-- Jonas
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: draw line
2008-03-19 21:00 draw line Jonas Bernoulli
@ 2008-03-20 7:19 ` David Hansen
2008-03-20 16:20 ` Kim F. Storm
1 sibling, 0 replies; 4+ messages in thread
From: David Hansen @ 2008-03-20 7:19 UTC (permalink / raw)
To: help-gnu-emacs
On Wed, 19 Mar 2008 22:00:00 +0100 Jonas Bernoulli wrote:
> Anyways, does anyone know of a way to draw a line?
Unicode line drawing characters? Of course that won't change the line
height.
David
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: draw line
[not found] <mailman.9244.1205978497.18990.help-gnu-emacs@gnu.org>
@ 2008-03-20 9:29 ` Johan Bockgård
0 siblings, 0 replies; 4+ messages in thread
From: Johan Bockgård @ 2008-03-20 9:29 UTC (permalink / raw)
To: help-gnu-emacs
"Jonas Bernoulli" <jonas@bernoulli.cc> writes:
> Anyways, does anyone know of a way to draw a line?
(insert (concat (propertize " "
'face '(:background "red")
'display '(space :height (1)))
(propertize "\n"
'face '(:background "red")
'line-height t)))
--
Johan Bockgård
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: draw line
2008-03-19 21:00 draw line Jonas Bernoulli
2008-03-20 7:19 ` David Hansen
@ 2008-03-20 16:20 ` Kim F. Storm
1 sibling, 0 replies; 4+ messages in thread
From: Kim F. Storm @ 2008-03-20 16:20 UTC (permalink / raw)
To: Jonas Bernoulli; +Cc: help-gnu-emacs
"Jonas Bernoulli" <jonas@bernoulli.cc> writes:
> I would like to draw a one-pixel line. I have tried quite a few things
> by now but none of them works.
>
> Here are two ways I have tried. Evaluating them should draw a red line
> on the next line, which is only one pixel high.
>
> (insert (concat "\n" (propertize "\n" 'face '(:background "red")
> 'display '(space :height (1)))))
>
> (insert (concat "\n" (propertize "\n" 'face '(:background "red")
> 'line-height 1)))
>
> This doesn't sound very promissing:
>
> 38.11 Line Height
> ... However, no matter what you specify, the actual line height can
> never be less than the default. ...
Does this help?
A newline can have a `line-height' text or overlay property that
controls the total height of the display line ending in that newline.
If the property value is `t', the newline character has no effect on
the displayed height of the line--the visible contents alone determine
the height. This is useful for tiling small images (or image slices)
without adding blank areas between the images.
--
Kim F. Storm http://www.cua.dk
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-03-20 16:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-19 21:00 draw line Jonas Bernoulli
2008-03-20 7:19 ` David Hansen
2008-03-20 16:20 ` Kim F. Storm
[not found] <mailman.9244.1205978497.18990.help-gnu-emacs@gnu.org>
2008-03-20 9:29 ` Johan Bockgård
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.