Gnus development mailing list
 help / color / mirror / Atom feed
From: William Perry <wmperry@aventail.com>
Cc: ding@ifi.uio.no
Subject: Re: gnus-picons update
Date: Mon, 9 Sep 1996 09:51:06 -0700	[thread overview]
Message-ID: <199609091651.JAA09612@newman> (raw)
In-Reply-To: <qk27mq3bujv.fsf@iptsun2.unil.ch>

Wesley Hardaker writes:
>Hans de Graaff <J.J.deGraaff@twi.tudelft.nl> writes:
>
>> What is irritating about this is that the initial line is just
>> text. As soon as the icons get inserted this changes the line height,
>> and shifts all other text down. Annoying. How about inserting a small
>> blank xpm of the proper height immediately, to reserve the line
>> height.
>
>I've thought about this...  However, this would slow it down more and
>additionally require reading yet one more image file...

  You would only need to do this once at startup.  And you can build a
pixmap pretty easily in memory.  I've got the code to do it for Emacs-W3.
Try something like:

(defun create-blank-pixmap (width height)
  (let ((retval
	 (concat "/* XPM */\n"
		 "static char *pixmap[] = {\n"
		 ;;"/* width height num_colors chars_per_pixel */\n"
		 (format "\"    %d   %d   2     1\",\n" width height)
		 ;;"/* colors */\n"
		 "\". c #000000 s background\",\n"
		 "\"# c #FFFFFF s foreground\",\n"
		 ;;"/* pixels /*\n"
		 ))
	(line (concat "\"" (make-string width ?.) "\"")))
    (while (/= 1 height)
      (setq retval (concat retval line ",\n")
	    height (1- height)))
    (concat retval line "\n};")))

Then: 
 (make-glyph (vector 'xpm :data (create-blank-pixmap 40 40))))

 Wheee.

-Bill P.


  reply	other threads:[~1996-09-09 16:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-09-06 13:11 Wesley.Hardaker
1996-09-09  8:53 ` Hans de Graaff
1996-09-09 15:02   ` Wesley.Hardaker
1996-09-09 16:51     ` William Perry [this message]
1996-09-10 13:55       ` Wesley.Hardaker

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=199609091651.JAA09612@newman \
    --to=wmperry@aventail.com \
    --cc=ding@ifi.uio.no \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).