emacs-devel
[Top][All Lists]
Advanced

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

Re: Pixel-based display functions


From: Eli Zaretskii
Subject: Re: Pixel-based display functions
Date: Sun, 01 Feb 2015 17:52:02 +0200

> Date: Sun, 01 Feb 2015 13:52:23 +0100
> From: martin rudalics <address@hidden>
> CC: Eli Zaretskii <address@hidden>, 
>  Stefan Monnier <address@hidden>,
>  address@hidden
> 
> And if this is still too complicated for you, simply give
> `window-text-pixel-size' an additional argument which suppresses the
> 
>    buf = w->contents;
>    CHECK_BUFFER (buf);
>    b = XBUFFER (buf);
> 
>    if (b != current_buffer)
>      {
>        old_buffer = current_buffer;
>        set_buffer_internal (b);
>      }
> 
>    ...
> 
>    if (old_buffer)
>      set_buffer_internal (old_buffer);
> 
> sections.  In that case it would be sufficient to make your temporary
> buffer current around the `window-text-pixel-size' call.

Maybe I misunderstand what Lars wants to do, but I think
window-text-pixel-size is the wrong tool for the job: it returns the
pixel size of text between 2 given positions, whereas Lars needs the
opposite: where is the position that produces a given pixel size.

Also, there's the visual vs logical order issue I mentioned in my
other mail.



reply via email to

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