Gnus development mailing list
 help / color / mirror / Atom feed
From: Hrvoje Niksic <hniksic@srce.hr>
Subject: Re: image instance/specifier/instantiator
Date: 24 Nov 1998 12:46:19 +0100	[thread overview]
Message-ID: <kig67c51fg4.fsf@jagor.srce.hr> (raw)
In-Reply-To: Lars Magne Ingebrigtsen's message of "24 Nov 1998 10:36:09 +0100"

Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> > BTW, why do you create image specifiers at all?  I don't think you
> > need to do that -- an instantiator should suffice.
> 
> Er...  I though
> 
>       (make-image-specifier
>        (vector (intern type) :data (buffer-string)))
> 
> was the simplest way to create an image?

Well, it creates an image specifier, which contains information how
the image should be displayed on various devices.  In XEmacs parlance,
the actual image in buffer is in called a "glyph", and the easiest way
to create it is using an instantiator, without mucking with image
specifiers at all (leave that to the internal code.)  For instance:

;; I like backquotes
(setq my-glyph (make-glyph `[,(intern type) :data ,(buffer-string)]))

Now, you can attach `my-glyph' at the beginning or an end of an extent
(this is considered "low-level"), or feed it to `make-annotation'.
The specifier will, of course, still be there:

(glyph-image my-glyph)
  => #<image-specifier global=((x) . [gif :file "/home/srce/hniksic/pics/kreten.gif" :data "GIF87a..."]>

XEmacs' interface to images may be a bit confusing at first; if you
don't understand how it works, feel free to ask.  Also, I've found
that chapter in the manual quite well written (but that's me.)

-- 
Hrvoje Niksic <hniksic@srce.hr> | Student at FER Zagreb, Croatia
--------------------------------+--------------------------------
You're never alone with schizophrenia.


  reply	other threads:[~1998-11-24 11:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-11-21  6:06 Lars Magne Ingebrigtsen
1998-11-22 13:09 ` Hrvoje Niksic
1998-11-24  9:36   ` Lars Magne Ingebrigtsen
1998-11-24 11:46     ` Hrvoje Niksic [this message]
1998-11-24 19:57       ` Lars Magne Ingebrigtsen

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=kig67c51fg4.fsf@jagor.srce.hr \
    --to=hniksic@srce.hr \
    /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).