Subject: bug#5721: Feature request: Function that returns absolute coordinates

From: Jan Djärv <[email-masked]>
Date: Thu, 15 Jul 2010 08:07:26 +0200

YAMAMOTO Mitsuharu skrev 2010-07-15 02.17:
>>>>>> On Wed, 14 Jul 2010 17:22:27 +0200, Jan Djärv<[email-masked]>  said:
>
>>> I think major motivation to use the absolute coordinate system is
>>> to specify the frame location (OP's case), or to pass it to
>>> external programs (the SCIM case).  "Absolute unscaled" one is more
>>> suitable for such uses.
>
>> I would imagine that for frame positioning, absolute scaled would be the
>> default, as top and left frame parameters should also be absolute
>> scaled.
>
> That would bring us coarser precision with respect to the frame
> position.  If the scale factor is 2, then we cannot place a frame to a
> position whose coordinate is an odd number (in absolute unscaled).

As I said below, special functions to do that based on unscaled coordinates 
would be needed.  But for the default scaled should be used.  Placing tooltips 
for example is much more common than placing frames.  Doing so based on scaled 
coordinates is no problem.  The alternative, to use unscaled, would make Emacs 
internals everywhere have to handle two coordinate systems all the time.  To 
knowingly introduce such an overhead on everything is madness.

>
> I doubt the OP still wants window edges in absolute coordinates
> systems, once he knows simple offsetting is not sufficient in general
> (i.e., with scale factor).
>

If all coordinates and sizes he uses are scaled, why isn't it sufficient?

	Jan D.