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: 21 Apr 2004 02:53:27 +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.

I just installed changes to implement posn-at-point and posn-at-x-y.

I also fixed a recent bug that practically disabled vscrolling.

However, there is still one important limitation to when vscroll actually works:

- If image at top row of screen is fully visible and cursor is in top
  row, vscroll is reset.  This is because making the cursor row fully
  visible takes precedence over vscroll.

My new fix ensures that if the top line contains an image which is
taller than the window height, vscroll is allowed even when the cursor
is in that line.

So if someone would like to enhance line-move and scrolling to
deal with "tall" images, please do it.

I have also added an enhancement to pos-visible-in-window-p to return
pixel coordinates and partial visibility status of the row at the
given position if PARTIALLY arg is non-nil.

E.g. if (nth 2 (pos-visible-in-window-p (window-start))) is non-nil,
the first line is only partially visible, so vscrolling may be
considered.

-- 
Kim F. Storm <address@hidden> http://www.cua.dk





reply via email to

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