[Top][All Lists]

[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 12:34:40 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

David Kastrup <address@hidden> writes:

> 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 don't see how.  Absolutely not.  Emacs moves point out of images.
> Without stopping points, point will not remain inside of the image
> anywhere.  

At least it could deal sensible with vscrolling through a partially
visible image without moving point out of the image until there is
some other visible line to move it to.

Stefan, isn't it be necessary to have some indication of whether
vscrolling will have any effect, i.e. whether the cursor line is
currently fully visible, or if there are N pixels invisible at the top
and M pixels invisible at the bottom?  E.g. a current-row-visibility
function which returns nil if fully visible and a cons (N . M)

>            And I certainly can't draw a cursor box over a selected
> area of an image.  Or have mouse highlighting over a selected area.

My image slice changes allows you to do exactly that, as each slice of
the image is inserted as a separate display property.

Re. image maps, I decided that for an image slice, the code still
references the image map of the full image, but restricted to the
current slice. So if you want each image slice to have specific
properties, you must create an image map corresponding to the actual
slicing of the image.

Of course, you may also put properties on each slice, as each slice
corresponds to a separate buffer position.

I will try to complete my changes during this week.

> I am still thinking about Kim's proposal (horizontal slices with
> vertical subslices) with regard to use under preview-latex.  It would
> certainly cater for pretty much every important application I
> currently have in mind.

Doing "free positioning (and rotation/orientation/scaling)" of images
and text is on my to-do list for 22.x.

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

reply via email to

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