From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: Several suggestions for image support Date: 19 Apr 2004 16:15:06 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <87zn98ybzl.fsf-monnier+emacs@gnu.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1082384549 6207 80.91.224.253 (19 Apr 2004 14:22:29 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 19 Apr 2004 14:22:29 +0000 (UTC) Cc: emacs-devel@gnu.org, Stefan Monnier , rms@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon Apr 19 16:22:20 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BFZf9-0000KO-00 for ; Mon, 19 Apr 2004 16:22:19 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BFZf9-00058Y-00 for ; Mon, 19 Apr 2004 16:22:19 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BFZZk-0008NO-K3 for emacs-devel@quimby.gnus.org; Mon, 19 Apr 2004 10:16:44 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1BFZZT-0008IH-4j for emacs-devel@gnu.org; Mon, 19 Apr 2004 10:16:27 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1BFZYw-0008DS-1K for emacs-devel@gnu.org; Mon, 19 Apr 2004 10:16:25 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BFZY9-00087Y-OO for emacs-devel@gnu.org; Mon, 19 Apr 2004 10:15:05 -0400 Original-Received: from fencepost.gnu.org ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.24) id 1BFZX4-0000kY-1e; Mon, 19 Apr 2004 10:13:58 -0400 Original-To: storm@cua.dk (Kim F. Storm) In-Reply-To: Original-Lines: 41 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:21882 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:21882 storm@cua.dk (Kim F. Storm) writes: > Stefan Monnier writes: > > > I already suggested to use two new primitives (that have incidentally > > been requested for other purpose): > > > > point-to-pixel > > and > > pixel-to-point > > > > which turn a (displayed) buffer position into a display position > > and vice versa. All the rest should then be reasonably easy to do > > in Elisp. > > Actually, these are easy to implement, so I'll do that. > > They will return a lispy position like the one returned by > event-start for a mouse click at the given point/position. > > In this context, the names posn-at-point and posn-at-x-y are better, > as they directly relate to the corresponding posn- macros. > > As a side bonus, pos-visible-in-window-p will be changed to return a > list [when partially arg is non-nil]: > > (x y top bottom) > > which specifies the x and y position of POS, and the number of pixels > not visible at the top and bottom of the corresponding window line. Is this really necessary? I think that it should be sufficient if we just returned x and y; if one wants to see which of the pixels are actually off-screen, then checking x and y for negative coordinates or coordinates that (if we add the object's x and y extent) pass beyond the screen dimension. I think that the situation where one would check for partial visibility is rare enough that complicating the data format is not warranted. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum