From: no-spam@cua.dk (Kim F. Storm)
To: "Jonas Bernoulli" <jonas@bernoulli.cc>
Cc: help-gnu-emacs@gnu.org
Subject: Re: draw line
Date: Thu, 20 Mar 2008 17:20:57 +0100 [thread overview]
Message-ID: <87myotwemu.fsf@kfs-lx.rd.rdm> (raw)
In-Reply-To: <201bac3a0803191400g2dfed3e1kf40180ac098ccf41@mail.gmail.com> (Jonas Bernoulli's message of "Wed\, 19 Mar 2008 22\:00\:00 +0100")
"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
next prev parent reply other threads:[~2008-03-20 16:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-19 21:00 draw line Jonas Bernoulli
2008-03-20 7:19 ` David Hansen
2008-03-20 16:20 ` Kim F. Storm [this message]
[not found] <mailman.9244.1205978497.18990.help-gnu-emacs@gnu.org>
2008-03-20 9:29 ` Johan Bockgård
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87myotwemu.fsf@kfs-lx.rd.rdm \
--to=no-spam@cua.dk \
--cc=help-gnu-emacs@gnu.org \
--cc=jonas@bernoulli.cc \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.