From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Oliver Scholz Newsgroups: gmane.emacs.devel Subject: Re: XPM via Lisp in the toolbar Date: Mon, 18 Nov 2002 15:08:29 +0100 Sender: emacs-devel-admin@gnu.org Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1037629689 18458 80.91.224.249 (18 Nov 2002 14:28:09 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 18 Nov 2002 14:28:09 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18Dmsi-0004nQ-00 for ; Mon, 18 Nov 2002 15:28:08 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18Dmux-0004cO-00 for ; Mon, 18 Nov 2002 15:30:27 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 18Dmqb-0002rY-00; Mon, 18 Nov 2002 09:25:57 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 18DmeX-0005dS-00 for emacs-devel@gnu.org; Mon, 18 Nov 2002 09:13:29 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 18DmeS-0005ct-00 for emacs-devel@gnu.org; Mon, 18 Nov 2002 09:13:28 -0500 Original-Received: from mail.gmx.net ([213.165.65.60]) by monty-python.gnu.org with smtp (Exim 4.10) id 18DmeR-0005cn-00 for emacs-devel@gnu.org; Mon, 18 Nov 2002 09:13:24 -0500 Original-Received: (qmail 14744 invoked by uid 0); 18 Nov 2002 14:13:19 -0000 Original-Received: from dialin-145-254-194-072.arcor-ip.net (HELO HERMES) (145.254.194.72) by mail.gmx.net (mp003-rz3) with SMTP; 18 Nov 2002 14:13:19 -0000 X-Mailer: emacs 21.2.1 (via feedmail 11-beta-1 Q) Original-To: Jason Rumney In-Reply-To: (Jason Rumney's message of "15 Nov 2002 15:06:30 +0000") X-Operating-System: GNU/Linux, built from scratch: http://www.linuxfromscratch.org/ X-Attribution: os X-Face: "HgH2sgK|bfH$;PiOJI6|qUCf.ve<51_Od(%ynHr?=>znn#~#oS>",F%B8&\vus),2AsPYb -n>PgddtGEn}s7kH?7kH{P_~vu?]OvVN^qD(L)>G^gDCl(U9n{:d>'DkilN!_K"eNzjrtI4Ya6;Td% IZGMbJ{lawG+'J>QXPZD&TwWU@^~A}f^zAb[Ru;CT(UA]c& User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-msvc-nt5.1.2600) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:9514 --=-=-= Jason Rumney 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: --=-=-= Content-Type: image/png Content-Disposition: attachment; filename=tool-barx.png Content-Transfer-Encoding: base64 iVBORw0KGgoAAAANSUhEUgAAAV4AAAB6CAIAAAB4A6zZAAAACXBIWXMAAAsTAAALEwEAmpwYAAAW WElEQVR4nO2df3AUx5XH32LOdumXkZCEhE44LkUY/TLYCIvIVQ4rjLFF7sqLoUKMc0K266pSCdhg AgTnUvmHC+JAMRBXKlXhgDM4VJFYxmUIoLJWxvyQjGTAWklEsoo7dLKEAAnvgkqHhXx/PNSZnemZ nenp2R/ifcqVzLZ6X7/u7fnO6zc9g8t3vgEIgiCCmQgABTNLIu0GQRDRxUT8v9YLjZH1gyCIqGJC pB0gCCIamaj88OSS/7Jv0eUCANfYB8WR6qMLFPUAXC7F8ZgZ7V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FvltoNdxpSIgJXUUdx 2oFo668szJw/ZvqLZwX7X5kuxg7aqEHYlLU05FMfL+I2plfuHALNhfxKNOfJotk3AaLqt7DaVhh8 k9KEzXPEQq5BbqIBD7S5MeO0inGhcXMGOTZtkkY7rNx2uV0Q9lOiHZN+Gjtvxr7JNJj2W3quCo8b s2YmTaj8k8lkobbLIdN+YDjrjJswrsnqa6Mkrp/G/thNQ5rPyRFEpKDZKAsLuYYw5FQIQphxtuaK ODGchiQIJXSJkgs9Q0EQBAeSBoIgOJA0EATBgaSBIAgOJA0EQXCIwB0K490sVnd9EPcmBrvXpOzK k4Wdh6bkugEWRyBa3teAPBVN7xeQRRTuw5VCBP00mCfcmRPB6WT/iTUp80dgBML9vgZjy2A6arC6 UVe7s9Uh+yrjTwk9hx9yQ7GlDdfKvbQGe8b17Bv0V66fZuobzBOBXcaW/DSwoJoY3I/cdiGU/xLn j7KCmd83it7XoFdoxsJT5p5X5x5LtA9Wnoc3065eYUibeo5pPxrbNzmeUvw0Uz9kNZPb+cXatWpW oF0zJZZcUpaDlfdrRNf7GqIQ1didkvc8fNgwGXXrBaKOLogE7MtCSruqiCzkBDgV0fdQcGeC3jjE 8EbpU5F4Pl+rsuFpNwyYvNiK2dEjguMZKR2XEq3IwmD8Y/V9DXaQ5aqAnUilJKXYMTDitP0wY2k+ 48XJ/FLIpmPO1VdVjsD7GrhpGG0fzCeTDNI83D9pk4XGxvWU9ZS95+GN29XWl5Le08uBGfyJ21+T fppx1cC+caf0/LRZDkLLe63bZua5yXGzP38M5qfe+Mf8+xoiHpIR4wyrl7rxSgy/ryF64k9inEG6 ALGehoy0C8Q4hOYVQs9QEATB4f8BaypXlZc6v9wAAAAASUVORK5CYII= --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit 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 concerned. Another thing is, that it seems that the :ascent attribute does not work; gamegrid.el needs to specify `:ascent 'center' for images. Oliver -- 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 --=-=-=--