From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ralf Angeli Newsgroups: gmane.emacs.devel Subject: Re: display-mm-width return value off on Windows Date: Fri, 07 Jul 2006 07:56:31 +0200 Organization: nil Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1152251816 27429 80.91.229.2 (7 Jul 2006 05:56:56 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 7 Jul 2006 05:56:56 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 07 07:56:55 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FyjKc-0001gw-Ux for ged-emacs-devel@m.gmane.org; Fri, 07 Jul 2006 07:56:51 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FyjKc-0004KL-Iw for ged-emacs-devel@m.gmane.org; Fri, 07 Jul 2006 01:56:50 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FyjKR-0004Jg-Ff for emacs-devel@gnu.org; Fri, 07 Jul 2006 01:56:39 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FyjKP-0004Hg-SH for emacs-devel@gnu.org; Fri, 07 Jul 2006 01:56:38 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FyjKP-0004Hd-MR for emacs-devel@gnu.org; Fri, 07 Jul 2006 01:56:37 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FyjKl-0006O2-1N for emacs-devel@gnu.org; Fri, 07 Jul 2006 01:56:59 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1FyjKN-0001fj-EE for emacs-devel@gnu.org; Fri, 07 Jul 2006 07:56:35 +0200 Original-Received: from p54a50e4d.dip0.t-ipconnect.de ([84.165.14.77]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 07 Jul 2006 07:56:35 +0200 Original-Received: from angeli by p54a50e4d.dip0.t-ipconnect.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 07 Jul 2006 07:56:35 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 26 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: p54a50e4d.dip0.t-ipconnect.de Cancel-Lock: sha1:p/1jqopBq4Mtf8qECYBbKssqomw= X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:56696 Archived-At: * Eli Zaretskii (2006-07-06) writes: >> From: Ralf Angeli >> >> display-mm-* display-mm-* >> Real size without patch with patch >> Width 330mm 320 305 >> Height 207mm 240 203 > > That is still not a very good approximation, is it? The values are more accurate than before. With the change Jason suggested they might improve even more. If I find time I'll ask the user who originally reported the problem to check a version of Emacs with the change applied. >> - cap = GetDeviceCaps (hdc, VERTSIZE); >> + height = round (GetDeviceCaps (hdc, VERTRES) >> + / GetDeviceCaps (hdc, LOGPIXELSY) * 25.4); > > What is this magic constant 25.4? As David wrote: millimeters per inch -- Ralf