[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: Fri, 02 Jul 2010 11:10:16 +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 Thu, 01 Jul 2010 14:37:22 +0200, Jan Djärv <address@hidden> said:

> I added functions window-absolute-pixel-edges and
> window-inside-absolute-pixel-edges.  I tested on X and Nextstep
> (OSX), but they probably do the wrong thing on w32.  I don't have
> w32 available.

What do you think about the following point?

>>>>> On Tue, 01 Jun 2010 10:16:08 +0900, YAMAMOTO Mitsuharu <address@hidden> 
>>>>> said:

> I'd rather suggest introducing some conversion functions between
> relative and absolute coordinate systems.  Newer versions of Mac OS
> X provides "Resolution Independence" that allows users to specify a
> scale factor:

> http://developer.apple.com/mac/library/documentation/UserExperience/Conceptual/HiDPIOverview/HiDPIConcepts/HiDPIConcepts.html

> With the scale factor, 1 pixel in the relative coordinate system no
> longer always correspond to 1 pixel in the absolute one.  Thus one
> cannot determine the corresponding absolute coordinates only from
> `inside-left' and `inside-top'.

(Maybe "pixel" above should be "unit".)

One can argue that the new API can return enough information to deal
with the scale factor by computing width and height in both relative
and absolute coordinate systems.  But I guess many programmers just
tends to add some offsets for the conversion between these coordinate
systems.  This might cause rewrite of elisp programs when GTK+
supports resolution independence in future.

                                     YAMAMOTO Mitsuharu

reply via email to

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