[Top][All Lists]

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

Re: Pixel-based display functions

From: Lars Ingebrigtsen
Subject: Re: Pixel-based display functions
Date: Sat, 07 Feb 2015 22:59:52 +1100
User-agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

> A few preliminary questions about this:
>  . Is it good enough to handle only a single physical line, starting
>    from a given POSITION argument and ending at the first newline that
>    follows POSITION?  (Handling of additional lines will then have to
>    be done in Lisp.)

If this can be done as fast as collecting the line data in C, that would
be fine.  But I would assume that there's quite a lot set-up overhead
before getting started.  For instance, calling `window-text-pixel-size'
ten times over separate lines instead of once on a region is way slower.

But if there's no setup overhead, then doing it per line basis would be

>  . What to assume/do with the various display features, like overlay
>    and display strings, images, align-to space specs, line-prefix,
>    etc., that can be pertinent to the portion of text being processed?
>    The easiest alternative is to handle them "as usual" in redisplay,
>    i.e. the corresponding glyphs will be produced and included in the
>    return value.  Is that OK?

Yes, including all that stuff is necessary to do the line filling.

>    If not, what else is needed for these
>    use cases?  (Note that if a display or overlay string includes
>    newlines, this means the result could span multiple screen lines --
>    will that be a problem?.)

Hm...  I hadn't though of that.  Well, in the shr case, there are no
overlays at all, and the only display strings are `align-to' one, I

>  . How will the caller specify the information about the display
>    defaults, like the faces?  The usual way is that some window is
>    specified, either explicitly as an argument or implicitly as the
>    currently selected window, and all the defaults are taken from that
>    window and its frame.  Is that good enough for your purposes?

Passing in an optional window, or if that's nil, the current window,
would be fine for shr's use case.  

(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/

reply via email to

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