[Top][All Lists]

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

Re: Several suggestions for image support

From: David Kastrup
Subject: Re: Several suggestions for image support
Date: 19 Apr 2004 16:15:06 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

address@hidden (Kim F. Storm) writes:

> Stefan Monnier <address@hidden> 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

reply via email to

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