[Top][All Lists]

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

Re: XPM via Lisp in the toolbar

From: Oliver Scholz
Subject: Re: XPM via Lisp in the toolbar
Date: Mon, 18 Nov 2002 15:08:29 +0100
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-msvc-nt5.1.2600)

Jason Rumney <address@hidden> writes:
> I had some time last night to look more closely, and I think I now
> have image masks working, and have fixed some of the more serious
> bugs.

Great! Many thanks. This is a *huge* improvement:

Attachment: tool-barx.png
Description: PNG image

However, I noticed two things:

The image mask seems to be supported only for `:mask 'heuristic'. This
determines the image mask by looking at the four corners of the
image. This is o.k. for almost any icon in the tool bar. But to get
its job done correctly in the general case, xpm.el needs to specify a
certain colour as the image mask, like: `:mask '(heuristic (0 0 0))'. 
This is so, because an XPM image may specify transparancy in arbitrary
places. For example: it could be a square containing a transparent
circle in the middle.

Unfortunately Emacs on MS Windows does not deal with 
`:mask '(heuristic (0 0 0)'. I generated the result in the attached
image by making a small change in xpm.el in order test your fix,
otherwise the icons would appear on a black background. But as I said
above, this is wrong in the general case. So could you implement this?
Or at least make Emacs on MS Windows ignore the part after
`heuristic'. This should do for most cases as far as icons are

Another thing is, that it seems that the :ascent attribute does not
work; gamegrid.el needs to specify `:ascent 'center' for images.

Oliver Scholz               27 Brumaire an 211 de la Révolution
Taunusstr. 25               Liberté, Egalité, Fraternité!
60329 Frankfurt a. M.       http://www.jungdemokratenhessen.de
Tel. (069) 97 40 99 42      http://www.jdjl.org

reply via email to

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