From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: Several suggestions for image support Date: 19 Apr 2004 17:56:49 +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 1082383521 3310 80.91.224.253 (19 Apr 2004 14:05:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 19 Apr 2004 14:05:21 +0000 (UTC) Cc: David Kastrup , rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon Apr 19 16:05:08 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 1BFZOV-0007O6-00 for ; Mon, 19 Apr 2004 16:05:07 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BFZOV-0004rO-00 for ; Mon, 19 Apr 2004 16:05:07 +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 1BFZJ9-0005S0-QG for emacs-devel@quimby.gnus.org; Mon, 19 Apr 2004 09:59:35 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1BFZHY-00057b-5U for emacs-devel@gnu.org; Mon, 19 Apr 2004 09:57:56 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1BFZGx-0004xW-P2 for emacs-devel@gnu.org; Mon, 19 Apr 2004 09:57:52 -0400 Original-Received: from [212.88.64.25] (helo=mail-relay.sonofon.dk) by monty-python.gnu.org with smtp (Exim 4.30) id 1BFZGw-0004ww-OP for emacs-devel@gnu.org; Mon, 19 Apr 2004 09:57:18 -0400 Original-Received: (qmail 81117 invoked from network); 19 Apr 2004 13:57:13 -0000 Original-Received: from unknown (HELO kfs-l.imdomain.dk.cua.dk) (213.83.150.2) by 0 with SMTP; 19 Apr 2004 13:57:14 -0000 Original-To: Stefan Monnier In-Reply-To: <87zn98ybzl.fsf-monnier+emacs@gnu.org> Original-Lines: 36 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:21881 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:21881 Stefan Monnier writes: > >> Of course, scrolling through large images should be possible, anyway, > >> and quite independent from that fanciful features. Emacs already has > >> set-window-vscroll in its display engine in order to deal perfectly > >> well with that. > > Yes, and it could probably be done entirely in lisp !? > > 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. -- Kim F. Storm http://www.cua.dk