[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: draw line
From: |
Kim F. Storm |
Subject: |
Re: draw line |
Date: |
Thu, 20 Mar 2008 17:20:57 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1.92 (gnu/linux) |
"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