emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Customizing the fringe bitmaps


From: Kim F. Storm
Subject: Re: Customizing the fringe bitmaps
Date: 08 Nov 2001 13:55:45 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1

Richard Stallman <address@hidden> writes:

> No, please don't implement it that way.  The clean thing to do is make
> the value of the actual variables be one of the binary formats already
> supported in :image.  Then you can have functions to convert between
> that format and ASCII art.
>
Yes, that would be much better!


However, I still think the idea of being able to edit the fringe bitmaps
directly in emacs is appealing.  Here is a simple proposal how to extend
the current image support to allow that:

The idea is to add support to emacs for a new ascii based image format.
I envision something like this:

A b&w image would be a simple text string like this:
 "BW 8 8\n........\n.****...\n.*..*...\n...  (etc)"

The header line specifies a black&white image of height 8 and width 8,
while the remaining (8) lines specifies b/w bitmap.

It would be easy to enhance this to support color images, e.g.
 "CLR 16 8 8 \nA=#119944, B=red, C= (etc)\n..AABBC.\n.AABBCC.\n... (etc)"

The header specifies a color image using 16 colors, height 8, width 8,
the next line defines the letters identifying each color, and
the remaining lines specifies the (color) bitmap.

That would allow us to create human editable, self-contained images
inside emacs, while still allowing the use of external image in the
currently supported formats.

Images with many colors will need some other representation (e.g. two
characters per color), but that is still doable.

> The advantage of this is that the conversion functions can be used in
> other contexts too.  The features are more orthogonal and more
> coherent.  So please do it this way.
> 

With the proposal above, writing those image conversion functions is
a separate project (for which I *might* volounteer sometime in the
future :-)

Once the conversion functions are written, the proposed ascii format
could be used as an interrim format for a new bitmap-edit-mode,
allowing a simple icon editor to be written for emacs (once the
conversion functions are in place, doing that would be an exercise for
the author :-).

-- 
Kim F. Storm <address@hidden> http://www.cua.dk




reply via email to

[Prev in Thread] Current Thread [Next in Thread]