[Top][All Lists]

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

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

From: YAMAMOTO Mitsuharu
Subject: bug#5721: Feature request: Function that returns absolute coordinates
Date: Thu, 15 Jul 2010 09:17:57 +0900
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI)

>>>>> On Wed, 14 Jul 2010 17:22:27 +0200, Jan Djärv <address@hidden> 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).

On Mac OS X, the window (in window system terminology) position should
be specified in the unscaled coordinate system even with non-indentity
scale factor.

> To pass absolute unscaled to an external program or to position on
> absolute unscaled a special functions would be needed.  But I don't
> think a function that gives window edges is the place to do that.

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).

I'm thinking about an interface that is parallel to posn-at-x-y and
returns absolute unscaled coordinates instead of position information.

  (posn-at-x-y x y &optional frame-or-window whole)

  Return position information for pixel coordinates x and y.
  By default, x and y are relative to text area of the selected window.
  Optional third arg frame-or-window non-nil specifies frame or window.
  If optional fourth arg whole is non-nil, x is relative to the left
  edge of the window.

                                     YAMAMOTO Mitsuharu

reply via email to

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