|
From: | Kevin Rodgers |
Subject: | Re: Calculate window size in pixels |
Date: | Fri, 06 May 2005 11:55:43 -0600 |
User-agent: | Mozilla Thunderbird 0.9 (X11/20041105) |
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)) -- Kevin Rodgers
[Prev in Thread] | Current Thread | [Next in Thread] |