[Top][All Lists]

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

Re: gamegrid.el and some games

From: Oliver Scholz
Subject: Re: gamegrid.el and some games
Date: Wed, 18 Sep 2002 17:04:41 +0200
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i686-pc-linux-gnu)

Richard Stallman <address@hidden> writes:

>     I don't know anything about Emacs' internals. Does an Emacs that
>     supports images always support colours, too?
> Emacs always supports colors, but the display in use could be monochrome.
> Use display-color-p to test that.

Pardon my ignorance: what happens with colour images on monochrome
displays? Are they displayed in shades of gray if
`display-grayscale-p' returns nil?  If so, the conversion of XPM to
PPM would probably do for such displays.

Are there any displays for which `display-images-p' returns t, but
both `display-color-p' and `display-grayscale-p' return nil? Is it
necessary to make sure that gamegrid.el DTRT on such displays?

If not, I suggest to simply convert XPMs via some Lisp functions if
Emacs is compiled without XPM-support on the C-level. I have written a
prototype[1] for this. What do you think?

Attachment: xpm.el
Description: application/emacs-lisp

    -- Oliver

PS: Could someone who has an Emacs compiled with image-support, but
without XPM-support check if the following gives a coloured image for
him or her, please?

(require 'gamegrid)

 (xpm-convert-string gamegrid-xpm 
                     '((col1 . "Blue") 
                       (col2 . "Red") 
                       (col3 . "Green")) 
                     :ascent 'center))

[1]  I have not read the specification for the XPM-format, yet. (My
ghostscript is b0rked.) My knowledge of the format is based on a few
example XPMs.
Furthermore I am just an amateur. I would appreciate it, if an
experienced programmer could have a quick glance over my code and tell
me if the approach is clean/unclean/silly/sound.
And finally, if you like the idea, this should probably go into
images.el, not into gamegrid.el, and hook there into the functions to
create images.
Jour du Génie de l'Année 210 de la Révolution
Liberté, Egalité, Fraternité!

reply via email to

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