emacs-devel
[Top][All Lists]
Advanced

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

Re: Add a function that returns pixel distance between points?


From: Eli Zaretskii
Subject: Re: Add a function that returns pixel distance between points?
Date: Sun, 31 Jan 2021 22:13:20 +0200

> From: Yuan Fu <casouri@gmail.com>
> Date: Sun, 31 Jan 2021 14:41:52 -0500
> Cc: emacs-devel@gnu.org
> 
> > Finally, I'm not sure why the behavior of window-text-pixel-size is a
> > problem: if you use :align-to with pixel units (as opposed to column
> > units), then you should _want_ it to account for stuff like
> > line-prefix, no?
> 
> Yes, value given to :align-to needs to account for line-prefix. But when I 
> want to calculate the pixel width of a column, I don’t want to include the 
> prefix: that makes the returned value larger than the actually width of the 
> column (because the line-prefix width is added to it).

But the pixel coordinate to which you need to align also needs to be
increased due to line-prefix, doesn't it?

IOW, can you show a test case where using window-text-pixel-size
returns incorrect results for :align-to due to line-prefix?



reply via email to

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