From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: Q on performance with 10000 faces Date: Mon, 22 May 2006 06:47:17 -0700 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1148305749 823 80.91.229.2 (22 May 2006 13:49:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 22 May 2006 13:49:09 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 22 15:49:04 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FiAmC-00085H-W7 for ged-emacs-devel@m.gmane.org; Mon, 22 May 2006 15:48:53 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FiAmC-0001X9-3p for ged-emacs-devel@m.gmane.org; Mon, 22 May 2006 09:48:52 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FiAkr-000134-RI for emacs-devel@gnu.org; Mon, 22 May 2006 09:47:29 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FiAkp-00012H-KJ for emacs-devel@gnu.org; Mon, 22 May 2006 09:47:29 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FiAkp-000129-Ei for emacs-devel@gnu.org; Mon, 22 May 2006 09:47:27 -0400 Original-Received: from [148.87.113.118] (helo=rgminet01.oracle.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.52) id 1FiAop-0008AV-6S for emacs-devel@gnu.org; Mon, 22 May 2006 09:51:35 -0400 Original-Received: from rgmsgw300.us.oracle.com (rgmsgw300.us.oracle.com [138.1.186.49]) by rgminet01.oracle.com (Switch-3.1.6/Switch-3.1.6) with ESMTP id k4MDlOqD029386 for ; Mon, 22 May 2006 07:47:24 -0600 Original-Received: from dradamslap (dhcp-amer-csvpn-gw1-141-144-65-244.vpn.oracle.com [141.144.65.244]) by rgmsgw300.us.oracle.com (Switch-3.1.7/Switch-3.1.7) with SMTP id k4MDlNXg008624 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Mon, 22 May 2006 07:47:24 -0600 Original-To: X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-Reply-To: Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1807 X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:55042 Archived-At: > I guess one alternative would be to insert an image of a > complete palette (like the image attached) You can construct that image on the fly using eg. XPM format. Where can I find doc to tell me how to do that? Anything in Emacs about it, or should I just google for "xpm"? To overcome limitations in number of available colors, you could construct 100 images covering one line each. What are the limitations you refer to here? I'm not clear how 100 single-row images would be better than one 110-row image. Is it because the number of colors is somehow limited per line? Then use the line-height property of the newline character to make the display "tight": (insert (propertize "\n" 'line-height t))))) BTW, why does that work for images but not, apparently, for text lines? At least it didn't seem to work for me - see bug report yesterday. Finally, you may use the :map property on images: `:map MAP' This associates an image map of "hot spots" with this image. That's what I couldn't find (what I meant by HTML image maps). Thx. An image map is an alist where each element has the format `(AREA ID PLIST)'. An AREA is specified as either a rectangle, a circle, or a polygon. A rectangle is a cons `(rect . ((X0 . Y0) . (X1 . Y1)))' which specifies the pixel coordinates of the upper left and bottom right corners of the rectangle area. A circle is a cons `(circle . ((X0 . Y0) . R))' which specifies the center and the radius of the circle; R may be a float or integer. A polygon is a cons `(poly . [X0 Y0 X1 Y1 ...])' where each pair in the vector describes one corner in the polygon. When the mouse pointer is above a hot-spot area of an image, the PLIST of that hot-spot is consulted; if it contains a `help-echo' property it defines a tool-tip for the hot-spot, and if it contains a `pointer' property, it defines the shape of the mouse cursor when it is over the hot-spot. *Note Pointer Shape::, for available pointer shapes. When you click the mouse when the mouse pointer is over a hot-spot, an event is composed by combining the ID of the hot-spot with the mouse event; for instance, `[area4 mouse-1]' if the hot-spot's ID is `area4'. Or simply use a common mouse click function and use the x,y coordinates of the mouse event to calculate which color is clicked. See posn-x-y and posn-object-x-y. That's what I meant. That would be my next move: just use the image I sent, knowing that it fits over the character grid I made originally and that I can record the colors of.