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:50:08 +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 1152251442 26706 80.91.229.2 (7 Jul 2006 05:50:42 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 7 Jul 2006 05:50:42 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 07 07:50:39 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 1FyjEb-00011S-Du for ged-emacs-devel@m.gmane.org; Fri, 07 Jul 2006 07:50:38 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FyjEZ-0000cf-QG for ged-emacs-devel@m.gmane.org; Fri, 07 Jul 2006 01:50:35 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FyjEP-0000cE-DS for emacs-devel@gnu.org; Fri, 07 Jul 2006 01:50:25 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FyjEN-0000bg-T4 for emacs-devel@gnu.org; Fri, 07 Jul 2006 01:50:25 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FyjEN-0000bb-Q6 for emacs-devel@gnu.org; Fri, 07 Jul 2006 01:50:23 -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 1FyjEj-0005te-4U for emacs-devel@gnu.org; Fri, 07 Jul 2006 01:50:45 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1FyjEG-0000zW-EZ for emacs-devel@gnu.org; Fri, 07 Jul 2006 07:50:16 +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:50:16 +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:50:16 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 39 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: p54a50e4d.dip0.t-ipconnect.de Cancel-Lock: sha1:UUktfWS0WO5Bq+PUjGYqn0Qp7G4= 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:56695 Archived-At: * Jason Rumney (2006-07-07) writes: > Ralf Angeli writes: > >> - cap = GetDeviceCaps (hdc, VERTSIZE); >> + height = round (GetDeviceCaps (hdc, VERTRES) >> + / GetDeviceCaps (hdc, LOGPIXELSY) * 25.4); > >> - cap = GetDeviceCaps (hdc, HORZSIZE); >> + width = round (GetDeviceCaps (hdc, HORZRES) >> + / GetDeviceCaps (hdc, LOGPIXELSX) * 25.4); > > Do these get any more accurate if you move the multiplication to > before the division? Then I get 296 for the width and 222 for the height. Here are the values from my other mail for reference: | display-mm-* display-mm-* | Real size without patch with patch | Width 285mm 370 279 | Height 215mm 277 203 | > If so, it might be worth changing. Otherwise, the results look just as > broken as what we have now. At least for the two cases at hand the change yields better results than before. They are closer to the real values and e.g. for the other user better match the screens aspect ratio. > You may have found two cases where the > results were closer, but it does not follow that they will always be > so if they are still wildly inaccurate. It might be worth gathering more data points. -- Ralf