From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mathias Dahl Newsgroups: gmane.emacs.help Subject: Re: Calculate window size in pixels Date: 07 May 2005 19:51:11 +0200 Message-ID: References: <87u0lgigvl.fsf-monnier+gnu.emacs.help@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1115488048 29319 80.91.229.2 (7 May 2005 17:47:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 7 May 2005 17:47:28 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat May 07 19:47:26 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DUTOP-0003mc-MX for geh-help-gnu-emacs@m.gmane.org; Sat, 07 May 2005 19:47:09 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DUTWN-0002zx-A5 for geh-help-gnu-emacs@m.gmane.org; Sat, 07 May 2005 13:55:23 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 16 Original-X-Trace: individual.net Ny7YLkW8YzPupczcY1MDpwyP6wkMwPGyPhN9DWUWbohbGtGMKi User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 Original-Xref: shelby.stanford.edu gnu.emacs.help:130755 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:26409 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:26409 Kevin Rodgers writes: > Mathias Dahl wrote: > > (defun window-height-pixels () > > (let ((line-pixel-height-ratio (/ (+ (frame-pixel-height) 0.0) (frame-height)))) > > (truncate (* (window-height) line-pixel-height-ratio)))) > > (defun window-width-pixels () > > (let ((column-pixel-width-ratio (/ (+ (frame-pixel-width) 0.0) (frame-width)))) > > (truncate (* (window-width) column-pixel-width-ratio)))) > > I think (+ (frame-pixel-DIMENSION) 0.0) can be replaced by > (float (frame-pixel-DIMENSION)) It can :), thanks! Looks better. /Mathias