emacs-devel
[Top][All Lists]
Advanced

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

Re: Several suggestions for image support


From: Kim F. Storm
Subject: Re: Several suggestions for image support
Date: 19 Apr 2004 17:56:49 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

Stefan Monnier <address@hidden> 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 <address@hidden> http://www.cua.dk





reply via email to

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